Yalai ya heee hee anyone?
You've declared the Apple array to be a char, which is one character. Try changing it to a string, instead of char.
Then, to read the entire line as one input, use
getline( inputFile, Apple[count] );
Last edited on
I did try it, the problem is that it does not copies the text after the spaces, for example
I want to take this whole line from txt file.
If I use string I will get only this part :
'asdfghi' and it will ignore 'jklmnb'
and if I use char I will only get 'a' because it is the first letter =/
read it into a std::string first.
although, have you done what whitenite said and use getline()?