Click here to Skip to main content
15,889,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Operator >> istream Pin
Luc Pattyn8-Jan-11 1:36
sitebuilderLuc Pattyn8-Jan-11 1:36 
AnswerRe: Operator >> istream Pin
Amine MAMA8-Jan-11 1:44
Amine MAMA8-Jan-11 1:44 
AnswerRe: Operator >> istream Pin
Luc Pattyn8-Jan-11 2:20
sitebuilderLuc Pattyn8-Jan-11 2:20 
AnswerRe: Operator >> istream Pin
User 74293388-Jan-11 2:57
professionalUser 74293388-Jan-11 2:57 
GeneralRe: Operator >> istream Pin
Amine MAMA8-Jan-11 3:14
Amine MAMA8-Jan-11 3:14 
AnswerRe: Operator >> istream Pin
User 74293388-Jan-11 3:33
professionalUser 74293388-Jan-11 3:33 
GeneralRe: Operator >> istream Pin
Amine MAMA8-Jan-11 7:36
Amine MAMA8-Jan-11 7:36 
AnswerRe: Operator >> istream Pin
Aescleal8-Jan-11 5:34
Aescleal8-Jan-11 5:34 
As well as the problem that Thaddeus mentioned your assignment operator is going to leak memory. If you changed your code to use std::string instead of messing about with character arrays and manual memory management the problem would go away. If you used std::string you wouldn't need a copy constructor, assignment operator or destructor so it looks like a win all round to me.

And just about as I was going to hit send I noticed that your copy constructor and destructor doesn't update the static data member appropriately either.

Cheers,

Ash

PS: You might like to consider binning all the explicit this->, there's no place in your code where you actually need it and it doesn't make your code any easier to read.

PPS: And the same goes for void as well.
QuestionGetting LogicalDriveInformation of different hard disks..... Pin
learningvisualc8-Jan-11 1:02
learningvisualc8-Jan-11 1:02 
AnswerRe: Getting LogicalDriveInformation of different hard disks..... Pin
User 74293388-Jan-11 1:26
professionalUser 74293388-Jan-11 1:26 
AnswerRe: Getting LogicalDriveInformation of different hard disks..... Pin
Luc Pattyn8-Jan-11 1:33
sitebuilderLuc Pattyn8-Jan-11 1:33 
QuestionRe: Getting LogicalDriveInformation of different hard disks..... Pin
David Crow10-Jan-11 5:48
David Crow10-Jan-11 5:48 
QuestionRead Serial Port data [modified] Pin
shiv@nand8-Jan-11 0:15
shiv@nand8-Jan-11 0:15 
AnswerRe: Read Serial Port data Pin
User 74293388-Jan-11 1:48
professionalUser 74293388-Jan-11 1:48 
AnswerRe: Read Serial Port data Pin
Richard MacCutchan8-Jan-11 2:36
mveRichard MacCutchan8-Jan-11 2:36 
QuestionPopulate An Array With Numbers. Pin
Mike Certini7-Jan-11 10:39
Mike Certini7-Jan-11 10:39 
AnswerRe: Populate An Array With Numbers. Pin
Nuri Ismail7-Jan-11 10:48
Nuri Ismail7-Jan-11 10:48 
GeneralRe: Populate An Array With Numbers. Pin
Mike Certini7-Jan-11 12:40
Mike Certini7-Jan-11 12:40 
QuestionUsing CSplitterWnd OnCreateClient to split window Pin
cy163@hotmail.com7-Jan-11 4:32
cy163@hotmail.com7-Jan-11 4:32 
AnswerRe: Using CSplitterWnd OnCreateClient to split window Pin
Eugen Podsypalnikov7-Jan-11 9:05
Eugen Podsypalnikov7-Jan-11 9:05 
Questionmanipulation de bits dans une variable quelconque Pin
andromida7-Jan-11 3:52
andromida7-Jan-11 3:52 
AnswerRe: manipulation de bits dans une variable quelconque Pin
Yusuf7-Jan-11 3:55
Yusuf7-Jan-11 3:55 
AnswerRe: manipulation de bits dans une variable quelconque Pin
Code-o-mat7-Jan-11 3:57
Code-o-mat7-Jan-11 3:57 
AnswerRe: manipulation de bits dans une variable quelconque Pin
User 74293387-Jan-11 4:02
professionalUser 74293387-Jan-11 4:02 
AnswerRe: manipulation de bits dans une variable quelconque Pin
Luc Pattyn7-Jan-11 5:26
sitebuilderLuc Pattyn7-Jan-11 5:26 

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.