i have a text file "test.txt" with "This is a secret file" in it. I want to read in the whole sentence in with white spaces and manipulate each character. How can i do this? My current method leaves out white spaces.
const int SIZE = 17;
char string2[SIZE];
ifstream fin;
fin.open("test.txt");
for (int n=0; n<SIZE; n++)
{
fin >> string2[n];
}
for (int n=0; n<SIZE; n++) //output is just for testing purposes
{
cout << string2[n];
}