The whole program is wrong, not just the define problem
C ’s native strings have no member functions
There is no semicolon at the end of the macro definition
#define NEWAPPPATH std::string("C:QQQQ.exe")
#define VALOPEN NEWAPPPATH.substr(0,NEWAPPPATH.findlast_of(''))
This allows the compiler to reluctantly execute
NEWAPPPATH.substr NEWAPPPATH is a char[] array and does not support . operation; it can be modified to NEWAPPPATH string("C :QQQQ.exe") give it a try.
Because NEWAPPPATH is a C string, and of course C string does not have the substr method.
The whole program is wrong, not just the define problem
C ’s native strings have no member functions
There is no semicolon at the end of the macro definition
#define NEWAPPPATH std::string("C:QQQQ.exe")
#define VALOPEN NEWAPPPATH.substr(0,NEWAPPPATH.findlast_of(''))
This allows the compiler to reluctantly execute