This may seem kinda dumb, but i dont really know how. I have a file filled with data, which is mostly numbers, but i have to extract a few strings too. I can easily get the numbers out with
myFile >> whateverVariable;
but i tried to get the string like this:
char * str;
str = new char [ 32 ];
myFile.getline( str, 32, '\n' )
i cout'ed str and it was null.
Please help,
-Steve
myFile >> whateverVariable;
but i tried to get the string like this:
char * str;
str = new char [ 32 ];
myFile.getline( str, 32, '\n' )
i cout'ed str and it was null.
Please help,
-Steve