Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Catching the launch of an applicatin Pin
Matthew Faithfull2-Nov-07 0:57
Matthew Faithfull2-Nov-07 0:57 
QuestionRe: Catching the launch of an applicatin Pin
David Crow2-Nov-07 3:06
David Crow2-Nov-07 3:06 
AnswerRe: Catching the launch of an applicatin Pin
TClarke2-Nov-07 4:00
TClarke2-Nov-07 4:00 
AnswerRe: Catching the launch of an applicatin Pin
jpgossieaux05-Nov-07 6:46
jpgossieaux05-Nov-07 6:46 
AnswerRe: Catching the launch of an applicatin Pin
Garth J Lancaster2-Nov-07 13:08
professionalGarth J Lancaster2-Nov-07 13:08 
Questionpointer on reference ? Pin
Rage1-Nov-07 23:55
professionalRage1-Nov-07 23:55 
AnswerRe: pointer on reference ? Pin
manish.patel2-Nov-07 0:02
manish.patel2-Nov-07 0:02 
AnswerRe: pointer on reference ? Pin
Matthew Faithfull2-Nov-07 0:19
Matthew Faithfull2-Nov-07 0:19 
Yes it is legal, this is how it breaks down, assuming the function was static just for example's sake

LPCTSTR pStr = _T("SomeString");
const XStr Source = _T("SomeSuperString");
const XStr* pSourceStr = &Source;
bool bResult = CMyClass::MyFunction( pStr, pSourceStr );
//pSourceStr may have been modified by the call but Source will still be the same

The function takes a pointer-by-reference, that is a reference to a pointer, as its second parameter. What this means to the caller is that when the function returns pSourceStr might have changed, it might point somewhere else now, but Source will not have.
This is usually done to get, in effect, a second return value from the function. The function will modify pSourceStr in order to communicate it back to the caller along with the bool result.

Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: pointer on reference ? Pin
Rage2-Nov-07 3:12
professionalRage2-Nov-07 3:12 
AnswerRe: pointer on reference ? Pin
led mike2-Nov-07 4:45
led mike2-Nov-07 4:45 
QuestionHow to learn Debugging Tools Pin
sheshidar1-Nov-07 23:40
sheshidar1-Nov-07 23:40 
AnswerRe: How to learn Debugging Tools Pin
Nelek1-Nov-07 23:52
protectorNelek1-Nov-07 23:52 
AnswerRe: How to learn Debugging Tools Pin
ThatsAlok2-Nov-07 3:14
ThatsAlok2-Nov-07 3:14 
JokeRe: How to learn Debugging Tools Pin
Hamid_RT2-Nov-07 6:45
Hamid_RT2-Nov-07 6:45 
GeneralRe: How to learn Debugging Tools Pin
ThatsAlok2-Nov-07 6:53
ThatsAlok2-Nov-07 6:53 
GeneralRe: How to learn Debugging Tools Pin
Hamid_RT2-Nov-07 19:13
Hamid_RT2-Nov-07 19:13 
Questionname conflicts in enum Pin
George_George1-Nov-07 23:26
George_George1-Nov-07 23:26 
AnswerRe: name conflicts in enum Pin
Bram van Kampen1-Nov-07 23:39
Bram van Kampen1-Nov-07 23:39 
GeneralRe: name conflicts in enum Pin
George_George1-Nov-07 23:44
George_George1-Nov-07 23:44 
GeneralRe: name conflicts in enum Pin
Bram van Kampen3-Nov-07 17:25
Bram van Kampen3-Nov-07 17:25 
GeneralRe: name conflicts in enum Pin
George_George3-Nov-07 23:07
George_George3-Nov-07 23:07 
AnswerRe: name conflicts in enum Pin
Matthew Faithfull1-Nov-07 23:52
Matthew Faithfull1-Nov-07 23:52 
GeneralRe: name conflicts in enum Pin
George_George2-Nov-07 0:00
George_George2-Nov-07 0:00 
QuestionVS2005 C++ Auto Formatting.. Pin
WHGibbo1-Nov-07 23:18
WHGibbo1-Nov-07 23:18 
QuestionRe: VS2005 C++ Auto Formatting.. Pin
Nelek1-Nov-07 23:51
protectorNelek1-Nov-07 23:51 

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.