View Single Post
Old 08-08-2007, 04:17 PM   #1 (permalink)
S0undW4v3
Recruit
 
Join Date: Aug 2007
Posts: 2
S0undW4v3 is on a distinguished road
Method call mishap

I'm getting back into coding again after not having done any for a while so I'm quite rusty. I started working with something really basic to get my head wrapped around inheritance again and I've come across a problem.
Code:
void main(void)
{
    Simple s;
    Basic b;

    s.SetType("big");
    b.SetClassFunc("print");

    s.GetType;
    b.GetClassFunc;

    //cout << s.GetType << endl;
    //cout << b.GetClassFunc << endl;

}
.\main.cpp(16) : error C3867: 'Simple::GetType': function call missing argument list; use '&Simple::GetType' to create a pointer to member

.\main.cpp(17) : error C3867: 'Basic::GetClassFunc': function call missing argument list; use '&Basic::GetClassFunc' to create a pointer to member

Code:
string Simple::GetType() const
{
    return mType;
}


string Basic::GetClassFunc() const
{
    return mClassFunc;
}
This is pretty basic stuff...but what am I missing here?
S0undW4v3 is offline   Reply With Quote