After VS2017 create a console application, normally finished writing code debugging, using the exe file appear directly executed flash back situation solutions.

This is the reason for the relative path since the code included.

The solution: put all relative path project included modifications to an absolute path.

(Personally I feel that because of the direct execution exe file, the default open in the user directory of the C drive.)

E.g:

std::string DATA_DIR = "data/";

change into:

std::string DATA_DIR = "E:/VS2017_Project/Project1/Identification/data/";

 

I try to be added to the system path environment variable, also without success.

In the CMD command line, change directory to the path VS2017 project, the implementation of the absolute path of the exe, only to find that you can succeed, only to find that the problem call path.

Guess you like

Origin www.cnblogs.com/ming-4/p/11502664.html