![]() |
|
#1
|
|||
|
|||
Static Class Member AccessingDose anybody help me, please!
See the following attatched program code(Cam.h and Cam.cpp) What I want to ask is how should I access the "data" of private class member "m_Image"? Please focus on following code: CPP / C++ / C Code:
Last edited by dsmith : 03-May-2004 at 08:14.
Reason: Please use [c] & [/c] when posting C++ code
|
|
#2
|
||||
|
||||
|
Since the member is a pointer, you must use pointer notation to access it.
CPP / C++ / C Code:
__________________
-Aaron |
|
#3
|
|||
|
|||
|
use a friend function in your class to access private data from outside the class
|
|
#4
|
||||
|
||||
|
Also, don't post new threads on the same code. You are allowed to ask more than one question per post/thread. Saves time and confusion.
__________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
|
#5
|
||||
|
||||
|
I wasn't aware that he posted this code in another thread. If he didn't create the original thread that contained this code, that would be why I haven't seen it, but I don't see any threads created for the purpose of getting help with this code other than the one I'm currently posting in...
__________________
-Aaron |
|
#6
|
|||
|
|||
|
haha this reminds me of aaron's thread which i think was the most read and replied to in this forum other than the sticky
![]() |
|
#7
|
||||
|
||||
|
Yeah, but I don't know why! I didn't post my code in two different threads... or did the thing with the friend function remind you of it? It's odd that friend functions would come up twice in such a short interval of time when it hadn't come up once previously... :-P
__________________
-Aaron |
|
#8
|
||||
|
||||
|
FYI: This topic was posted in another GID Forum and then moved to here by another mod. I have since deleted the thread. So before this gets out of hand, Walt and Aaron are both correct
|
|
#9
|
|||
|
|||
|
Quote:
yeah i meant friend function thing |
|
#10
|
||||
|
||||
|
Well I wouldn't say we beat it to death... although, when I have a question, the subject does tend to be beaten!
__________________
-Aaron |
Recent GIDBlog
Toyota - 2008 November Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with class functions | Mjkramer21 | C++ Forum | 2 | 23-Apr-2004 09:23 |
| [You Decide] - What is the colour for Member: Level 5 | JdS | GIDForums™ | 5 | 17-Mar-2004 05:14 |
| Upgrade of BBCode class sometime today | JdS | GIDForums™ | 4 | 03-Nov-2003 08:18 |
| need help to define a class in C++ | yannoush | C++ Forum | 7 | 09-Sep-2003 01:28 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The