I forgot something.. help :)

Started by
4 comments, last by ThomasSauder 21 years, 6 months ago
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
Advertisement
Yes, it would.
int* hitme -- pointer to int
char* hitme -- pointer to char
... and so on ...
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
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.
It would be a pointer to one or more instances of the Help class.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
so with the pointer *plz, i could make it point to long m_int like this?:

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();

This topic is closed to new replies.

Advertisement