I forgot something.. help :)
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
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.
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.
so with the pointer *plz, i could make it point to long m_int like this?:
plz = &m_int
almost done with this thread
plz = &m_int
almost done with this thread
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();
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();
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement