Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ThomasSauder

I forgot something.. help :)

This topic is 5746 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

say you''re declaring something like the following: function(whatever *hitme) I''m just wondering what the *hitme would represent. Would it be a pointer to whatever? I''ve seem to have a memory lapse

Share this post


Link to post
Share on other sites
Advertisement
ok, say you have a class like this:

class Help
{
public:
long m_int;
};

long Value( Help *plz)
{}

Just wondering if that syntax means that plz would be a pointer to the class help. Thanks.

Share this post


Link to post
Share on other sites
Yes.

Also...

CHelp Help;
CHelp* m_pHelp;

m_pHelp = &Help; //Sets the m_pHelp pointer to the Help object

Call your aforementioned function Value(...) like this
Value(m_pHelp);
or like this:
Value(&Help);

Also you can create a new CHelp dynamically and assign it to a CHelp pointer like this...
m_pHelp = new CHelp();

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!