trying to read in a file. not working out lol. please help here is the code. i'm using xcode and it is in c++. the getline line is giving me an error. i've tried const.txt but its also not working.
Code:
#include <iostream>
#include <fstream>
#include <strstream>
#include <string>
using namespace std;
int main (int argc, char * const argv[]) {
string line;
ifstream myReadFile ("const.rtfd");
while (!myReadFile.eof())
{
myReadFile.getline(myReadFile,line);
std::cout << line << endl;
}
return 0;
}