Hi,
I have got some questions about "For Loop".
I was working on my program in which I made a class of student.
I wanted to have a "for loop" in it as :
-------------------------------------------------
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
main()
{
char grade;
int i;
for( i=0;i<5;i++)
{
cout<<"pls enter the grade of student";
cin>>"i"
grade=cin.get(i)
}
system("pause");
}
|
-----------------------------------------------
I have just made this program to test,I want user to input the grade of the student and that value should be stored in "i". Later that value in
"i" that user entered must be stored in the variable
"grade".
But when I compile this program I get an error messege.
I wanted to know what mistake am I making ?
Also have I declared the variable for "i" correctly?
Thanks