I am using Qt Creator for a simple C ++ project without Qt libraries.
I am trying to open a file as follows:
fopen("text.txt", "r");
or
ifstream fin; fin.open("text.txt");
But this does not work with the file name, as in Visual Studio, I have to pass the full path to open the file ...
Does anyone know why? and how can I reference the current directory without using Qt libs?
source share