I'm trying to load a binary file, and after testing to see if it passed, it fails every time. I assumed just putting the file name in the quotes would assume the default path of the exe. For example, lets say your exe is stuffed away in some folder such as C:\Programming\Loading Binary Files\ and you have a file called test.bin in the same folder as the exe. It still fails with this simple code:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream file ("test.bin", ios::in | ios::binary);
if(file)
{
cout << "passed" << endl;
file.close();
}
else
cout << "fail" << endl;
system("pause");
return 0;
}
So without having to type an entire path of the test.bin, what is the default path of the file assuming if you were to just put the file name in quotes and not a full file path? Thanks in advance.