c++ - Error C3867 'DataBase::isUserAndPassMatch': non-standard syntax; use '&' to create a pointer to membe -
ive been trying figure out while couldent find solution.
when write code line in cpp file:
if(database::isuserandpassmatch(u->getusername(), " ")){}
i error c3867. tried switch u->getusername() empty string (" ") still same error. tried this:
if(&database::isuserandpassmatch(u->getusername(), " ")){}
isuserandpassmatch:
bool database::isuserandpassmatch(std::string username, std::string password){}
suppose have class definition:
class database { public bool isuserandpassmatch() {return true;} };
if want call isuserandpassmatch member function, have have object:
database db; if( db.isuserandpassmatch() ) { }
try it.
Comments
Post a Comment