Hi all,
I'm having an issue when try to access private member function like this:
/*source.cpp*/
class TEMP{
private:
void funcNeedToTest(); //this function has private access specifier
};
void TEMP::funcNeedToTest(){
//do something
}
and in test script, I change the access specifier of private member function funcNeedToTest() to public:
/*testScript.cpp*/
class TEMP{
public:
void funcNeedToTest(); //in test script, I think I can access to funcNeedToTest() from outside class TEMP :)
};
void main(){
TEMP obj;
obj.funcNeedToTest();
return 0;
}
But with MSVC, the linker has reported an error: error LNK2019: unresolved external symbol "public: void __thiscall TEMP::funcNeedToTest(void)" referenced in function _main
This issue has not happened with GCC. So is there any option from MSVC to ignore access specifier in signature ?
Thank you!