usingit only stores in the array the characters in the file untill a space is found. How do I store the entire line in the array?Code:infile >> char_array;
Thanks
-Peter
This is a discussion on Input full line from file within the C++ Programming forums, part of the General Programming Boards category; using Code: infile >> char_array; it only stores in the array the characters in the file untill a space is ...
usingit only stores in the array the characters in the file untill a space is found. How do I store the entire line in the array?Code:infile >> char_array;
Thanks
-Peter
um
infile.getline(szBuffer, int howlong, delimiter) so..
Code:intfile.getline(szBuffer, 100, '\n'); //gets 100 characters..or until the enter key in file has been press..and stores in szBuffer..szBuffer can be a pointer to char..but remember to allocate memory or..make it an array of characters..
nextus, the samurai warrior