Hi guys,
for some reason my file doesn't get open its in same directory as the executable.
Here is my code
Code:#include <iostream> #include <fstream> #include <string> using namespace std; int main(void) { ifstream in; ofstream out; string data; in.open("x.txt"); if(!in.good()){ cout << "Error opening the input file for reading data\n"; return 1; } out.open("output.txt"); if(!out.good()){ cout << "Error opening the output file for writing data\n"; return 1; } getline(in,data); cout << data << endl; return 0; return 0; }