Reputation: 11
I am trying to run a C++ demo code in Visual Studio Code on windows, I am getting error "identifier "SOLUTION_DIR" is undefined C/C++(20)" how I can solve this ? and how I can replace it?
const auto pathData = SOLUTION_DIR"data/S2.tsv";
here also pic shows the error enter image description here
Upvotes: 1
Views: 63
Reputation: 1974
The C++ demo is originally meant for Visual Studio.
You can either
#define SOLUTION_DIR "C:\\mypath\\todata\"
in the beginning of a header or cpp file using it,const auto pathData = "c:\\mypath\\todata\\data\\S2.tsv";
(assuming the program can accept '' and '/'Upvotes: 1