reading a row of characters from an input file
Ok, I am trying to read a row of characters which should be a single string from an input file. the input file is a plain text .dat file that has each piece of data on a separate line. In my program, I have a variable which reads the character data with a 'char' data type.
problem is, it only reads the first character and that's it.
Because I'm new to C++ i'm not sure what data type i can use to have it read the entire line of characters as one. Please help!!
|