Click here to Skip to main content
15,790,917 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get rid of warning message from Microsoft code Pin
Richard MacCutchan18-Sep-09 6:21
mveRichard MacCutchan18-Sep-09 6:21 
AnswerRe: How to get rid of warning message from Microsoft code Pin
Michael Dunn18-Sep-09 9:38
sitebuilderMichael Dunn18-Sep-09 9:38 
AnswerRe: How to get rid of warning message from Microsoft code Pin
Richard MacCutchan18-Sep-09 23:17
mveRichard MacCutchan18-Sep-09 23:17 
Questionsome questions about "reference to pointer" Pin
lhyblue18-Sep-09 4:57
lhyblue18-Sep-09 4:57 
AnswerRe: some questions about "reference to pointer" [modified] Pin
«_Superman_»18-Sep-09 5:08
professional«_Superman_»18-Sep-09 5:08 
GeneralRe: some questions about "reference to pointer" Pin
CPallini18-Sep-09 5:17
mveCPallini18-Sep-09 5:17 
GeneralRe: some questions about "reference to pointer" Pin
«_Superman_»18-Sep-09 5:19
professional«_Superman_»18-Sep-09 5:19 
GeneralRe: some questions about "reference to pointer" Pin
lhyblue18-Sep-09 5:44
lhyblue18-Sep-09 5:44 
Thank you for replying.

Yes I know I can use a ref to obj directly.

But in C#, classes can only be ref types.

If I pass an object to a method, I'm passing a ref type.

And I can pass this ref type either by value or by ref (using the ref kerword).

I don't know if C# reference is the same as C++ reference, but I think passing a ref type by value/ref in C# is similar to passing a pointer by value/ref in C++.

If I pass a ref/pointer by ref, I can change the state of the obj it references/points to, and I can reference/point to other objects.

My questions are:
Why void Swap((Person *) &a, (Person *) &b) doesn't work?
And how do I write a similar Swap() method using Java? Can I?
GeneralRe: some questions about "reference to pointer" Pin
Stuart Dootson18-Sep-09 5:48
professionalStuart Dootson18-Sep-09 5:48 
GeneralRe: some questions about "reference to pointer" Pin
CPallini18-Sep-09 12:14
mveCPallini18-Sep-09 12:14 
GeneralRe: some questions about "reference to pointer" Pin
Stuart Dootson18-Sep-09 13:40
professionalStuart Dootson18-Sep-09 13:40 
GeneralRe: some questions about "reference to pointer" Pin
CPallini18-Sep-09 14:15
mveCPallini18-Sep-09 14:15 
GeneralRe: some questions about "reference to pointer" Pin
Stuart Dootson18-Sep-09 14:28
professionalStuart Dootson18-Sep-09 14:28 
GeneralRe: some questions about "reference to pointer" Pin
CPallini19-Sep-09 1:26
mveCPallini19-Sep-09 1:26 
GeneralRe: some questions about "reference to pointer" Pin
Stuart Dootson19-Sep-09 8:25
professionalStuart Dootson19-Sep-09 8:25 
GeneralRe: some questions about "reference to pointer" Pin
CPallini19-Sep-09 23:06
mveCPallini19-Sep-09 23:06 
GeneralRe: some questions about "reference to pointer" Pin
Stuart Dootson19-Sep-09 23:15
professionalStuart Dootson19-Sep-09 23:15 
QuestionDISP_E_UNKNOWNNAME Pin
Mohanraj D18-Sep-09 4:20
Mohanraj D18-Sep-09 4:20 
AnswerRe: DISP_E_UNKNOWNNAME Pin
Stuart Dootson18-Sep-09 4:25
professionalStuart Dootson18-Sep-09 4:25 
AnswerRe: DISP_E_UNKNOWNNAME Pin
CPallini18-Sep-09 4:30
mveCPallini18-Sep-09 4:30 
QuestionHow to use ShellStyle.dll in MFC Application Pin
themilan18-Sep-09 3:37
themilan18-Sep-09 3:37 
AnswerRe: How to use ShellStyle.dll in MFC Application Pin
enhzflep18-Sep-09 6:19
enhzflep18-Sep-09 6:19 
QuestionRe: How to use ShellStyle.dll in MFC Application Pin
themilan18-Sep-09 21:43
themilan18-Sep-09 21:43 
QuestionAdding 2 double datat types Pin
dipuks18-Sep-09 3:35
dipuks18-Sep-09 3:35 
AnswerRe: Adding 2 double datat types [modified] Pin
Code-o-mat18-Sep-09 3:39
Code-o-mat18-Sep-09 3:39 

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.