Ok I set an array but it wont execpt spaces? Is there a Tutorial on this or can any instruct me how to get it to work? The array is in a loop and the loop goes crazy when is sees the space.:)
Thanks
Printable View
Ok I set an array but it wont execpt spaces? Is there a Tutorial on this or can any instruct me how to get it to work? The array is in a loop and the loop goes crazy when is sees the space.:)
Thanks
post your code we are not psychic and dont forget the [ c o d e ][ / c o d e ] tags.
Using my crystal ball, I suggest that you use cin.getline instead of cin. Make sure you call cin.clear and cin.ignore after every call of cin.getline to make sure that you will have no problems with the input the next time.
"Make sure you call cin.clear and cin.ignore after every call of cin.getline to make sure that you will have no problems with the input the next time."
Why would you have any problems? cin.getline reads up to the delimiter and removes it from the stream.