Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
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
Old 08-09-2007, 07:37 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,711
redhead is on a distinguished road
perhaps
Code:
s.GetType();
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 08-09-2007, 08:44 AM   #3 (permalink)
S0undW4v3
Recruit
 
Join Date: Aug 2007
Posts: 2
S0undW4v3 is on a distinguished road
It worked, thank you. I can't believe it was something so simple. Well, I guess I'll have to spend a little more time working on my code and skim through a C++ book for a refresher.
S0undW4v3 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assembelly code register addressing toblerone Assembly 5 05-22-2006 02:53 AM
help me.. how to apply inheritance&polymorphsm in GUI ice Java 7 03-27-2006 12:27 PM
Multithreaded application in Windows XP Hamlin Assembly 4 02-19-2006 07:03 PM


All times are GMT -8. The time now is 09:38 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting