![]() |
C++ Symbol Question... ' -> '
Hi guys. I know this is probably a laughable question but I'm wondering with the symbol -> means in the context of a class. The example I can give is from the text book I'm reading at the moment: 'Mfc Programming with Visual c++'.
:
CClient *pClient;If you need to know more about the example please let me know and I will post the whole code as that's just selected lines. I guess that it means that the function 'input()' should act on pClient? Sorry if this is really simple but googling '->' obviously comes up with nothing and I don't know what it would be called? Thanks in advance. |
It dereferences a pointer in an object context. pClient is a pointer to an object that has an Input () member function. Your statement executes that one, rather than an Input () member of some other class.
|
Cheers for the reply. It's times like this I wish I practised my c++ all year round and not just in the two months before assignments are in!!
So pClient is a pointer to an object. The object is of type CClient? Would that mean that Input() is a member function of the class CClient? |
That would be correct.
|
Brilliant, thanks a lot!
|
| All times are GMT -5. The time now is 2:24 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC