im working through TICPP one and i cant seem to get getline() to work;
i am actually having a new problem. ive gotten getline to work. i was just reading from the wrong stream. but now i cant seem to get the output in normal text rather then hex?
0x22fdb4 is what i get. when i want to output the whole string
any help at all is appreciatedCode:#include <iostream> #include <string> #include <fstream> using namespace std; int main(){ string msg = "this is a string"; ofstream space_fileA ("spaces.txt"); space_fileA<< msg; space_fileA.close(); ifstream space_fileB ("spaces.txt"); space_fileB>> msg; getline(space_fileB, msg); }