Well, i'm really new into programming, and I'm not a native english sepaker, so please, if you dont't get what I'm saying don't get mad :)
What I'm trying to do is this:
[...]
int i, numberOfStudents
string studentName[100];
cout<<"Input the number of students"<<endl;
cin>>numberOfStudents;
cout<<"Input the student's names"<<endl;
for (i=0; i<numberOfStudents; i[CODE][/CODE]++) {
printf("Student %d: ",i+1);
cin>>studentName[i];
}
NOTE: I've translated the code from its original language to English, so if you see any silly syntax mistake, is probably just a typo.
Now, what I wanna do is to be able to input the complete students name, by this I mean name and last name, but when I do so, it takes the value for student 1 and student 2, instead of just one student
BTW, also when i declare the studentName variable, you may notice it is inicialized in a 100 value, i did that 'cause I don't know how to make it whit my numberOfStudents variable. In other words, WHAT I HAVE IS THIS:
string studentName[100];
And what I want is this:
string studentName[numberOfStudents];