Guys, please help me how to open text file in a directory where i am executing the c++ program. Is there a shortcut not to specify the complete path of it.
#include <fstream>
#include <iostream>
int main ( )
{
std::ifstream IStream_1 ( "MyFile.txt" ) // the .txt must be in the directory where the .exe is!
std::ifstream IStream_2 ( "../MyFile.txt" ) // if the .exe is in C:\Folder\Xyz\my.exe - the .txt must be in C:\Folder\MyFile.txt\MyFile.txt
}