
January 8th, 2004, 07:04 PM
|
 |
Contributing User
|
|
Join Date: Sep 2003
Location: New Zealand
|
|
|
char array index position
Hi all.
Im trying to take inputs of a user and enter them into a char array in a loop.
for(count=1; count<=amount;count++)
{ cout<<"\n enter string.. \n";
cin.getline(user_input,100);
}
then I want to increment the array by 1 so that the user can input another string which can be stored in the next position of the array.
my problem is doing this with the cin.getline function.
can i do this without a 2d array, (i have been told i can)
and could someone help me with the code.
I also have no idea how to output that array again.
hope thats clear.
cheers Dirk
|