Click here to Skip to main content
15,891,372 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerWelcome in the CP's Members Memorable Quotes! Pin
CPallini7-Apr-09 7:08
mveCPallini7-Apr-09 7:08 
AnswerRe: ondraw Pin
Alan Balkany7-Apr-09 3:59
Alan Balkany7-Apr-09 3:59 
QuestionBegin C++ Pin
yesu prakash7-Apr-09 2:49
yesu prakash7-Apr-09 2:49 
QuestionRe: Begin C++ Pin
David Crow7-Apr-09 3:03
David Crow7-Apr-09 3:03 
AnswerRe: Begin C++ Pin
yesu prakash7-Apr-09 3:08
yesu prakash7-Apr-09 3:08 
GeneralRe: Begin C++ Pin
David Crow7-Apr-09 3:13
David Crow7-Apr-09 3:13 
Questionauto_ptr Pin
sashoalm7-Apr-09 2:45
sashoalm7-Apr-09 2:45 
AnswerRe: auto_ptr Pin
Sarath C7-Apr-09 3:43
Sarath C7-Apr-09 3:43 
sashoalm wrote:
p = new foo;


are you sure. that you'd able to do this? I think compiler will throw error.

You've to be careful about auto_ptrs unusual characteristic. Copying them them to null, and the copying pointer assumes sole ownership of the resource

See the example demonstrate this issue from Effective C++ 3rd Ed.

std::auto_ptr<Investment>                 // pInv1 points to the
  pInv1(createInvestment());              // object returned from
                                          // createInvestment
std::auto_ptr<Investment> pInv2(pInv1);   // pInv2 now points to the

                                          // object; pInv1 is now null
pInv1 = pInv2;                            // now pInv1 points to the

// object, and pInv2 is null

-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin

GeneralRe: auto_ptr Pin
sashoalm7-Apr-09 4:22
sashoalm7-Apr-09 4:22 
QuestionMFC in VS2003 Pin
p_19607-Apr-09 0:55
p_19607-Apr-09 0:55 
AnswerRe: MFC in VS2003 Pin
Rajesh R Subramanian7-Apr-09 1:08
professionalRajesh R Subramanian7-Apr-09 1:08 
AnswerRe: MFC in VS2003 Pin
Stuart Dootson7-Apr-09 1:14
professionalStuart Dootson7-Apr-09 1:14 
GeneralRe: MFC in VS2003 Pin
Rajesh R Subramanian7-Apr-09 1:26
professionalRajesh R Subramanian7-Apr-09 1:26 
JokeHey man: welcome again in the CP's members memorable quotes! Pin
CPallini7-Apr-09 1:44
mveCPallini7-Apr-09 1:44 
GeneralRe: Hey man: welcome again in the CP's members memorable quotes! Pin
Rajesh R Subramanian7-Apr-09 1:51
professionalRajesh R Subramanian7-Apr-09 1:51 
GeneralRe: MFC in VS2003 Pin
Stuart Dootson7-Apr-09 1:57
professionalStuart Dootson7-Apr-09 1:57 
GeneralRe: MFC in VS2003 Pin
Rajesh R Subramanian7-Apr-09 2:48
professionalRajesh R Subramanian7-Apr-09 2:48 
QuestionModeles , Modal dialog window and variable Pin
durban27-Apr-09 0:51
durban27-Apr-09 0:51 
AnswerRe: Modeles , Modal dialog window and variable Pin
Cedric Moonen7-Apr-09 1:00
Cedric Moonen7-Apr-09 1:00 
AnswerRe: Modeles , Modal dialog window and variable Pin
CPallini7-Apr-09 1:01
mveCPallini7-Apr-09 1:01 
AnswerRe: Modeles , Modal dialog window and variable Pin
Jonathan Davies7-Apr-09 1:10
Jonathan Davies7-Apr-09 1:10 
Questioniostream compatibility problems Pin
Varghese Paul M7-Apr-09 0:06
Varghese Paul M7-Apr-09 0:06 
AnswerRe: iostream compatibility problems Pin
Stuart Dootson7-Apr-09 1:06
professionalStuart Dootson7-Apr-09 1:06 
QuestionHow can check ActiveSync or Mobile device centre installed on PC? Pin
Le@rner6-Apr-09 23:57
Le@rner6-Apr-09 23:57 
Questionplease guide I program for fax modem, thanks Pin
aa_zz6-Apr-09 23:34
aa_zz6-Apr-09 23:34 

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.