Click here to Skip to main content
15,922,309 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The exact size of "string" problem Pin
«_Superman_»22-Nov-09 16:53
professional«_Superman_»22-Nov-09 16:53 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf22-Nov-09 17:36
tyftyftyf22-Nov-09 17:36 
AnswerRe: The exact size of "string" problem [modified] Pin
JohnCz22-Nov-09 18:44
JohnCz22-Nov-09 18:44 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf22-Nov-09 19:27
tyftyftyf22-Nov-09 19:27 
GeneralRe: The exact size of "string" problem Pin
JohnCz23-Nov-09 6:10
JohnCz23-Nov-09 6:10 
GeneralRe: The exact size of "string" problem Pin
tyftyftyf23-Nov-09 16:55
tyftyftyf23-Nov-09 16:55 
GeneralRe: The exact size of "string" problem Pin
JohnCz23-Nov-09 17:36
JohnCz23-Nov-09 17:36 
Questionrunning time of java pograms Pin
cool_joy222-Nov-09 16:14
cool_joy222-Nov-09 16:14 
AnswerRe: running time of java pograms Pin
Richard MacCutchan22-Nov-09 21:36
mveRichard MacCutchan22-Nov-09 21:36 
GeneralRe: running time of java pograms Pin
cool_joy225-Nov-09 22:34
cool_joy225-Nov-09 22:34 
GeneralRe: running time of java pograms Pin
Richard MacCutchan25-Nov-09 23:49
mveRichard MacCutchan25-Nov-09 23:49 
GeneralRe: running time of java pograms Pin
cool_joy228-Nov-09 1:52
cool_joy228-Nov-09 1:52 
QuestionITextServices::Release() doesn't effect.That causes memory leaking. Pin
hawkgao012922-Nov-09 15:14
hawkgao012922-Nov-09 15:14 
QuestionError during compilation that I dont understand. [Solved] Pin
stianhh22-Nov-09 0:59
stianhh22-Nov-09 0:59 
AnswerRe: Error during compilation that I dont understand. Pin
Richard MacCutchan22-Nov-09 1:11
mveRichard MacCutchan22-Nov-09 1:11 
GeneralRe: Error during compilation that I dont understand. Pin
stianhh22-Nov-09 9:37
stianhh22-Nov-09 9:37 
GeneralRe: Error during compilation that I dont understand. Pin
Richard MacCutchan22-Nov-09 11:41
mveRichard MacCutchan22-Nov-09 11:41 
AnswerRe: Error during compilation that I dont understand. Pin
Cedric Moonen22-Nov-09 3:58
Cedric Moonen22-Nov-09 3:58 
QuestionCode snippet for searching a file in directory (directory can have subdirectories in it) Pin
V K 221-Nov-09 19:16
V K 221-Nov-09 19:16 
AnswerRe: Code snippet for searching a file in directory (directory can have subdirectories in it) Pin
22491721-Nov-09 19:47
22491721-Nov-09 19:47 
AnswerRe: Code snippet for searching a file in directory (directory can have subdirectories in it) Pin
breezes2008_22-Nov-09 0:35
breezes2008_22-Nov-09 0:35 
AnswerRe: Code snippet for searching a file in directory (directory can have subdirectories in it) Pin
T210222-Nov-09 12:28
T210222-Nov-09 12:28 
QuestionConverting "C++" language code code to "C" language code. [modified] Pin
hivicky21-Nov-09 17:55
hivicky21-Nov-09 17:55 
I wrote a program in C++ to store student details. Basically it stores 5 student's registration numbers with their GPAs and there are other functions in the program too.
I'm trying to convert the code to work in 'C' but I'm getting too many errors, especially where the arrays are concerned.
It would be very helpful if anyone could point me in the right direction or even give me a piece of the converted "C" code because that way I'll know what to change as I know C++ but I don't know C.
A piece of my C++ code i.e. the case1 statement is as follows:


#include*stdio.h
#include*stdlib.h

int main()
{

const int size = 5;
float gpa[size],sum=0,avg;
int i,regno[size],reg,flag=0;
char value;
while(value!='0')
{//start of while
cout<<"\t\t\t---MAIN MENU---\n\n\n\n";
cout<<"\n\nPress 1 to enter GPA(s) and registration number(s)";
cout<<"\n\nPress 2 to upgrade GPA(s)";
cout<<"\n\nPress 3 to display average of all the entered GPAs";
cout<<"\n\nPress 4 to display all the GPAs and regestration numbers";
cout<<"\n\nPress 5 to display registration number(s) of GPA of 4 holders";
cout<<"\n\nPress 0 to exit the program";
cout<<"\n\n\n\n\nEnter value = ";
cin>>value;

if(value=='0')
{
break;
}

switch(value)
{
case '1':

for(i=0;i*is less than*size;i++)
{
cout<<"\t\t\tENTER DATA\n\n\n\n";
cout<<"\n\n\nEnter GPA of student: "<<i+1<<" :="" ";
="" cin="">>gpa[i];
cout<<"\n\n\nEnter registration number of student: "<<i+1<<" :="" ";
="" cin="">>regno[i];
}

cout<<"\n\n\n\t\tPress any key to go back to the main menu";
getch();
break;
}
}


modified on Sunday, November 22, 2009 12:11 AM

AnswerRe: Converting "C++" language code code to "C" language code. Pin
Rajesh R Subramanian21-Nov-09 18:29
professionalRajesh R Subramanian21-Nov-09 18:29 
AnswerRe: Converting "C++" language code code to "C" language code. Pin
Richard MacCutchan22-Nov-09 1:58
mveRichard MacCutchan22-Nov-09 1:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.