Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Previous selection in listbox? Pin
Ravi Bhavnani14-Apr-05 7:05
professionalRavi Bhavnani14-Apr-05 7:05 
GeneralRe: Previous selection in listbox? Pin
Bob Stanneveld14-Apr-05 23:11
Bob Stanneveld14-Apr-05 23:11 
Questionmultiple windows in Visual Studio 7.0? Pin
IlanTal14-Apr-05 3:33
IlanTal14-Apr-05 3:33 
AnswerRe: multiple windows in Visual Studio 7.0? Pin
Chris Losinger14-Apr-05 4:40
professionalChris Losinger14-Apr-05 4:40 
GeneralGetParent() always returns NULL!! Pin
Dave_14-Apr-05 2:56
Dave_14-Apr-05 2:56 
General->Operator overloading in C++ Pin
Member 6822414-Apr-05 2:37
Member 6822414-Apr-05 2:37 
GeneralRe: ->Operator overloading in C++ Pin
Maximilien14-Apr-05 3:12
Maximilien14-Apr-05 3:12 
GeneralRe: ->Operator overloading in C++ Pin
Cedric Moonen14-Apr-05 3:23
Cedric Moonen14-Apr-05 3:23 
Honnestly I found that overriding the -> in this case is not really appropriate. It breaks the 'natural law' for objects and pointers. Here, you have an object (that is not a pointer !) and you will access it's member variable as if it was a pointer ! So that's really strange...
This operator is sometimes overriden in some very specific cases like for example when it must be 'seen' as a pointer (a class that wraps a pointer for example). The best example is the 'smart pointers'. It's a class that wraps a pointer and handle all the memory management for this pointer (ok, I won't describe the functionality of the smart pointers...). So there is here a purpose for overloading this operator: give the class the same 'feel' as it was a real pointer !

In your case, it has nothing to do with pointers at all so your code look like you access your member variable as if the object was a pointer...

Otherwise, I don't see why you want to use so complicated things: why don't you just write a function that will check this ?? And there is no way to know if the operator is read for reading or writing as far as I know (I might be wrong...).
QuestionHow to start NT services in VC++ Pin
aloktambi14-Apr-05 2:24
aloktambi14-Apr-05 2:24 
AnswerRe: How to start NT services in VC++ Pin
ThatsAlok14-Apr-05 2:46
ThatsAlok14-Apr-05 2:46 
Questionhow to make random number generate fuction in vc++ Pin
aloktambi14-Apr-05 2:23
aloktambi14-Apr-05 2:23 
AnswerRe: how to make random number generate fuction in vc++ Pin
David Crow14-Apr-05 2:31
David Crow14-Apr-05 2:31 
AnswerRe: how to make random number generate fuction in vc++ Pin
ddmcr14-Apr-05 4:47
ddmcr14-Apr-05 4:47 
AnswerRe: how to make random number generate fuction in vc++ Pin
El Corazon14-Apr-05 5:18
El Corazon14-Apr-05 5:18 
GeneralFailed to register service during VC build Pin
pettink14-Apr-05 2:12
pettink14-Apr-05 2:12 
GeneralRe: Failed to register service during VC build Pin
Blake Miller14-Apr-05 4:28
Blake Miller14-Apr-05 4:28 
Generalconvert hex value to string Pin
Jangid14-Apr-05 1:54
Jangid14-Apr-05 1:54 
GeneralRe: convert hex value to string Pin
Bob Stanneveld14-Apr-05 3:34
Bob Stanneveld14-Apr-05 3:34 
GeneralRe: convert hex value to string Pin
CP Visitor14-Apr-05 4:28
CP Visitor14-Apr-05 4:28 
GeneralRe: convert hex value to string Pin
Blake Miller14-Apr-05 4:31
Blake Miller14-Apr-05 4:31 
GeneralRe: convert hex value to string Pin
itkid15-Apr-05 0:26
itkid15-Apr-05 0:26 
Generallinker error Pin
MilanZ14-Apr-05 0:53
MilanZ14-Apr-05 0:53 
GeneralRe: linker error Pin
David Crow14-Apr-05 2:29
David Crow14-Apr-05 2:29 
GeneralFade in out of WAV file Pin
jase_dukerider14-Apr-05 0:52
jase_dukerider14-Apr-05 0:52 
Generalcode verfication tool for c++ Pin
Member 188188814-Apr-05 0:33
Member 188188814-Apr-05 0:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.