Search code examples
c++stringborland-c++

String from file C++ BorlandC 3.1


I'm trying to put the content of a file into a variable, but I'm having issues with BorlandC 3.1 . I've read the documentation for this on http://cplusplus.com/doc/tutorial/files/ but, I don't have getline in Borland...

Can anyone point me to a way to get the string from the first line of the file into a variable ? Thanks.


Solution

  • There is more than one getline. Use the <iostream> one since BC++ 3.1 does not come with the one provided by <string> (because it precedes STL by quite a few years if I remember correctly).