So I have this:
class A
{
private:
    unsigned int _uid; //user identifier
public:
    A();
    A(const char *, const char *, int, int, const char *, const char *, const char *);
    virtual ~A();
    int getUserID();
};
int A::getUserID(){
    return _uid;
}
//The class UserDB is not that important as this method is at this moment.
void UserDB::adduser(A* newUser){
    if(newUser.getUserID == 0) //Not working, not sure why... Gives syntax error. (1)
    //Something is done if the condition is true;
};
int main(){
    UserDB B
    A tempObj;
    //Assume the 7 following variables have been initialized correctly.
    char uloginName[9];
    char homeDirectory[33];
    int userID;
    int groupID;
    char password[17];
    char shell[17];
    char gecos[65];
    tempObj = new A(uloginName, password, userID, groupID, gecos, homeDirectory, shell);
    B = new UserDB();
    B.addUser(tempObj);
}
And so somehow I cannot get the parameter pointer to use the accessor method (refer at line marked by (1)). Can someone give me a quick fix? I searched a for a way to do it but no one seems to have accessors with parameters being pointers to an object.
 
     
     
     
     
    