I'm trying to create a function that will get a text file and return a vector of strings, one for each line.
I think my main problem is that I don't understand exactly how to exactly syntax it. I'm adding the code for it and please let me know what is my problem.
Don't mind the fact that at the moment it should just print the content of the file.
OK ive done some checkings and indeed the file is not successfully opened.
Any idea how to fix that? let me know if I need to give more info.
And yes, my code would look like that exactly, just for the moment I want to see that the file is read properly.
Use the full directory structure to identify the file to open, or make sure that the file you want to open is in the same directory as the executable you are running (i.e. your program).
Unfortunately it dosen't work as well. They are both in the same folder but the file does not open.
B.T.W I'm running all this through the konsole cause my eclipse does not work. So maybe I have problem with that? The file compiles well, but maybe I need to do linking or something to both files?
For now what I've done is just compiling the program.cpp and run it.