Click here to Skip to main content
15,908,274 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
Stuart Dootson8-Nov-08 1:10
professionalStuart Dootson8-Nov-08 1:10 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
King_jinjing8-Nov-08 5:38
King_jinjing8-Nov-08 5:38 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
Stuart Dootson9-Nov-08 22:21
professionalStuart Dootson9-Nov-08 22:21 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
King_jinjing10-Nov-08 3:15
King_jinjing10-Nov-08 3:15 
QuestionNT Services (ATL Com AppWizard - ServerType:Service(exe) ) Pin
Taruni4-Nov-08 0:48
Taruni4-Nov-08 0:48 
AnswerRe: NT Services (ATL Com AppWizard - ServerType:Service(exe) ) Pin
led mike4-Nov-08 6:53
led mike4-Nov-08 6:53 
QuestionIs it to return the address of an element in a vector Pin
followait29-Oct-08 0:11
followait29-Oct-08 0:11 
AnswerRe: Is it to return the address of an element in a vector Pin
Roger Stoltz29-Oct-08 0:39
Roger Stoltz29-Oct-08 0:39 
followait wrote:
Is it the address of the element in the vector,
and is it safe?


Yes, &*it is the address of the vector element that the iterator refers to.

Whether it's "safe" or not depends on what you mean by "safe".
It is safe regarding if the address returned really is the address of the contained element.
But considering that you are handing out a non-const pointer or reference to the object, the caller may change it at will. This could of course be considered as "not safe" in some way.

However, your code snippet doesn't seem to compile correctly.
In your function declaration you say that the return type is a reference to a myclass object, but you actually return a pointer to it unless you've omitted something important. The return statement should read 'return *it;'.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


AnswerRe: Is it to return the address of an element in a vector Pin
Stuart Dootson29-Oct-08 4:13
professionalStuart Dootson29-Oct-08 4:13 
GeneralRe: Is it to return the address of an element in a vector Pin
followait29-Oct-08 5:01
followait29-Oct-08 5:01 
AnswerRe: Is it to return the address of an element in a vector Pin
Jürgen Jung5-Nov-08 22:08
Jürgen Jung5-Nov-08 22:08 
AnswerRe: Is it to return the address of an element in a vector Pin
Michael Dunn5-Dec-08 15:54
sitebuilderMichael Dunn5-Dec-08 15:54 
Questiona small question about STL naming convention Pin
followait27-Oct-08 16:51
followait27-Oct-08 16:51 
AnswerRe: a small question about STL naming convention Pin
Stuart Dootson27-Oct-08 23:57
professionalStuart Dootson27-Oct-08 23:57 
QuestionDoes IE forward WM_DISPLAYCHANGE Message to ATL Plugin Pin
chatko23-Oct-08 14:40
chatko23-Oct-08 14:40 
AnswerRe: Does IE forward WM_DISPLAYCHANGE Message to ATL Plugin Pin
Stuart Dootson23-Oct-08 21:25
professionalStuart Dootson23-Oct-08 21:25 
GeneralRe: Does IE forward WM_DISPLAYCHANGE Message to ATL Plugin Pin
chatko27-Oct-08 2:51
chatko27-Oct-08 2:51 
QuestionHow to Monitor "Internet explorer" ? Pin
mohamed hedi16-Oct-08 23:48
mohamed hedi16-Oct-08 23:48 
AnswerRe: How to Monitor "Internet explorer" ? Pin
Michael Dunn18-Oct-08 17:10
sitebuilderMichael Dunn18-Oct-08 17:10 
GeneralRe: How to Monitor "Internet explorer" ? Pin
mohamed hedi19-Oct-08 23:30
mohamed hedi19-Oct-08 23:30 
QuestionNever Created a ATL project from scratch on VC2003 - Manging COM ATL output files Pin
Stone Free16-Oct-08 6:12
Stone Free16-Oct-08 6:12 
AnswerRe: Never Created a ATL project from scratch on VC2003 - Manging COM ATL output files Pin
Stone Free16-Oct-08 6:32
Stone Free16-Oct-08 6:32 
QuestionRe: Never Created a ATL project from scratch on VC2003 - Manging COM ATL output files Pin
Stone Free16-Oct-08 6:49
Stone Free16-Oct-08 6:49 
QuestionReturning any HRESULT from FinalConstruct other than S_OK, results in client receiving REGDB_E_CLASSNOTREG Pin
Stone Free15-Oct-08 7:33
Stone Free15-Oct-08 7:33 
AnswerRe: Returning any HRESULT from FinalConstruct other than S_OK, results in client receiving REGDB_E_CLASSNOTREG Pin
Stuart Dootson15-Oct-08 10:09
professionalStuart Dootson15-Oct-08 10:09 

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.