49,757 Topics

Member Avatar for
Member Avatar for dospy

i have this question in mind since i first found out that you can declare and array like this [CODE] <type>* nArray [/CODE] how does the compiler how much storage to allocate? i've heard that it doesn't allocate any storage, it just points to some address and when you use …

Member Avatar for dospy
0
102
Member Avatar for Max Hydes

hi people I have a project that requires me to use time.h in animation. can anyone show me a simple code of animation using time.h???

Member Avatar for Max Hydes
0
890
Member Avatar for kwamba

How can you combine different c++ programs into one full software. I am using the Code::blocks IDE

Member Avatar for Ketsuekiame
0
104
Member Avatar for jayden118

Hi all, I'm new to c++ and currently i need to write a program to open csv file and store all data into a vector of double. After trying my codes for few days, i have encountered a problem. I couldn't load all columns of csv data into an array.Please …

0
74
Member Avatar for ratatat

hi guys. there is this c++ program i have wrote and i would like to use time.h in order to manipulate the way strings are going to be displayed in my program. the lecturer said it is possible but the problem is i just dont know how to do it. …

Member Avatar for Narue
-1
66
Member Avatar for caut_baia

Hello.I've been looking for a free C++ compiler for windows which supports the new standard features but i had little luck so far.Does someone have any knowledge of one? Thank you in advance.

Member Avatar for caut_baia
0
437
Member Avatar for dospy

i really need a GOOD socket tutorial, i've followed some of them from google but they aren't complete, i know that socket programming is forked into many categories, basically i am interested blocking & non blocking sockets, synchronous & asynchronous sockets(used with select() and FD_ISSET macro etc) PS: i know …

Member Avatar for dospy
0
166
Member Avatar for Zssffssz

ok this is one of the many things I don't trust google on. What is a good new compiler (C++ and D would be nice) for Linux? Kubuntu PS Is the system() function universal as in it will do the same thinge in Linux Windows and OSX

Member Avatar for limaulime
0
226
Member Avatar for Zssffssz

Ok so I want to have the user imput a name of a file to decode it. How would I do that? EX: cin>>fill ifstream in (fill)

Member Avatar for limaulime
0
250
Member Avatar for amulgarg

[CODE]#include<iostream> using namespace std; void prin();//statement a main() { int x; //statement 1 x=34;//statement 2 return 0; }[/CODE] I wanted to know if the variable x is allocated memory in statement 1 or in statement 2. Its a long time doubt and no one really gives a clear and confident …

Member Avatar for limaulime
0
99
Member Avatar for meli123

[CODE]// bintodec.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> using namespace std; int main(){ string inp; int dec = 0; char base; cout << "Input a number: "; cin >> inp; cout << "Input the base your number is in: "; …

Member Avatar for D33wakar
0
79
Member Avatar for suraj_p

this program calculates all the prime numbers between two input numbers num1 and num2. first an array is created and num1,num1+1,......num2 are stored in that array and then all elenemts of array are scanned and if they are divisible by any odd number except itself or by 2 then 0 …

Member Avatar for vijayan121
0
168
Member Avatar for ryl

The input for this program should be like this: How many tests? 4 Grade on Test 1? 95 Grade on Test 2? 88 Grade on Test 3? 80 Grade on Test 4? 96 Your average is: 89.75 <------- this is where I can't get it right, can anybody take a …

Member Avatar for ryl
0
134
Member Avatar for jmay1327

I am trying to use functions in the following program. The program is supposed to use a vector of structures to store a students first name, last name, and grades. Also, to get a average for each student and a class average. I do not think I am calling the …

Member Avatar for jmay1327
0
138
Member Avatar for Undertech

I have nearly finished an assignment that calls for implementing a media library. I have pinpointed my current solution for the addItem method in the library class as a memory leak, but so far I am not certain how to fix it. The addItem method I have so far is …

Member Avatar for doug65536
0
2K
Member Avatar for skips

I have already downloaded eclipse SDK (the java version) but wish to download CDT so that I can write in C++. Referring to the website ([url]http://www.eclipse.org/cdt/downloads.php[/url]) I tried exactly what they said. I went to help-->Install new software--> clicked ADD --> and pasted in the location ([url]http://download.eclipse.org/tools/cdt/releases/galileo[/url]) since I have …

Member Avatar for skips
0
301
Member Avatar for MUNAM BIN TARIQ

[CODE]#include<iostream.h> int main() { int num,j,c=0,limit,i,k; int*freq=new int[]; int*munam=new int[]; cout<<"How many times u want to enter the numbers\n"; cin>>k; cout<<"tell ur range in which u will enter\n"; cin>>limit; for( i=0; i<k; i++) { cout<<"Enter number\t"<<i+1; cin>>munam[i]; if(num>limit) { cout<<"invalid num"; return 0; } for( j=0; j<limit; j++) { freq[j]=0; …

Member Avatar for MUNAM BIN TARIQ
0
89
Member Avatar for eblanco1

[CODE]#include <iostream> #include <cstdlib> #include <math.h> #include <iomanip> using namespace std; const string FILLER = " "; int main() { int w1 = 20; int w2 = 20; int w3 = 20; int w4 = 16; //variable declarations string firstname,lastname; int marital_status; float gross_income; const float tax_rate_0 = 0.10; const …

Member Avatar for eblanco1
0
168
Member Avatar for jed123

Can you guys give a code or something. Any simple graphics would do. i have initiated my graphics.h I've tried using the codes i found online but they give me errors. LINKER errors. Please help me. Thank you!

0
111
Member Avatar for jmay1327

I am trying to display the sNames vector. I am not sure if I am storing the information correctly. Any help would be greatly appreciated. Also I am trying to get an average for each students exam grades and a class average, and I am not sure how to go …

Member Avatar for jmay1327
0
212
Member Avatar for murnesty

if i declare size 5 array [CODE]char ch[5]={'1','2','3','4','5'};[/CODE] Then the null will store at the address ch+5 ? even i didn't declare the size for the null to place. If so mean it may overlap value on that memory address?

Member Avatar for NP-complete
0
159
Member Avatar for buzz9948

I am attempting to make a number guessing game but I need to use functions I figured a good spot for this would be the greater and less than problems that I need to include to make the user know what they have, I am horrible with functions and dont …

Member Avatar for palav sandeep
0
127
Member Avatar for I am dumb

OK Im new to C++, I'm still a beginner, i know how to make simple calculations and all. But looping is completely different and I have no idea where to start: Here's all that I have for this question (Write an application that keeps inputting an integer from the user …

Member Avatar for gerard4143
0
238
Member Avatar for ben1996123

Is it possible? How do I do it? I need a function to return the players name, so I have this as the prototype: [code]string getPlayerName();[/code] And this as the function: [code]string mainFunctions::getPlayerName(){ return playerName; } [/code] But I get an error saying that the function called 'string' doesn't have …

Member Avatar for ben1996123
0
94
Member Avatar for Majestics

I have a experience of network programming in java... now i want to implement them in c with more better support, i have used c++ long time a ago... Now i dont know which compiler of c++ is better, which support socket api... and which operating system provide more flexibility …

Member Avatar for doug65536
0
203
Member Avatar for hsiaoyk901201

hello, i am a C beginner. please check the code for me. The program is running fine,but is not giving the correct output or should is say no output. The output supposed to give the code of the team that ranked higher. #include <stdio.h> char rankTeams(int, int, int, int, char, …

Member Avatar for Anirudh Rb
0
201
Member Avatar for dragon_chick

Hi all. I'm writing a program to explain and verify the birthday paradox. I am generating 1000 sets (only 10 to test with) of birthdays, checking for matches, then displaying the results. I'm using srand to seed my generator and rand() to get 23 sets. The problem is 2-fold. 1) …

Member Avatar for dragon_chick
0
412
Member Avatar for Zssffssz

Ok this is somewhat of a second related post of my other one "C++ File". There is no need to read the other post just want to tell you. I want to make a console app that does the XOR thing I heard about using the simple ifstream and ofstream …

Member Avatar for doug65536
0
229
Member Avatar for anujthefuhrer
Member Avatar for anujthefuhrer

The End.