Solved Getline and ifstream are undefined!

May 1, 2012 at 17:41:02
Specs: Windows 7
I am building a tutoring program with Opengl and glut.h. I am trying to read in the questions and answers from a text file using ifstream and getline, but they both are undefined, even though I have included string and fstream. Any ideas? I'm all out.

See More: Getline and ifstream are undefined!

Report •


#1
May 1, 2012 at 18:33:39
✔ Best Answer
Try using "std::ifstream" and "std::getline"

How To Ask Questions The Smart Way


Report •

#2
May 1, 2012 at 19:06:44
It worked! I guess I forgot that if I don't put "using namespace std" I have to put that. Thank you!

Report •

Related Solutions


Ask Question