I have problem with opening file from other directory.
If i have txt file in other directory and main.cpp in root I don't have problem with reading but if i put main.cpp in another directory i have no idea how i can read it, or how should look access path.
Try it without the first '/'
example: string filename = "../../input.txt";
Note, you can repeat the "../" as many times as required to go up more than one level.
Or to guarantee it will find the file, give the full path including drive letter,
"D:\\temp\\myfiles\\stuff.txt"