Archived

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

ThomasSauder

I forgot something.. help :)

Recommended Posts

ThomasSauder    122
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
ThomasSauder    122
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
Igilima    122
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