Hey Guys. This is a weird one. Basically what I am doing is reading a string from the file using getline(file, buffer) where buffer is a C++ string. For example: lets say the file contains the string "hello" without the quotes on one line. After I read the file and print out the buffer it says "hello" (cout << buffer) like it should..BUT when I do this:

buffer == "hello" , the answer is false. Why? I can't seem to see why. Furthermore, when I do cout << buffer << "." << endl;

I get this output:

.ello

Why is this happening? In case you are wondering the file does not contain any blank spaces or lines after the string "hello". Any ideas?