this doesn''t seem to be a SFML related question, but you don't need to provide the full path just to open an external file with fstream. you can just use std::ifstream file ("test.txt");
to open a file that is in the same folder your projects is, just make sure the file does exist.
Let me just make what Stauricus said a bit more accurate:
[...] you can just use std::ifstream file ("test.txt");
to open a file that is in the working directory [...]