Hi guys, i would like an help about putting manually a path in my code.
This is what my code should looks like
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
int main ()
//declare what the path file looks like (char and not, for ex: C:\test\testfile.text) as we can se there aren't only char type inputs but also "/"
cin >> path;
ifstream f (path);
string s;
if (!f)
{
cout << "the file doesn't exist! Try moving the exe file or put the txt file into this folder!" << endl;
}
while(f.good())
{
getline(f, s);
cout<<s<<endl;
}
f.close();
return 0;
}