Click here to Skip to main content
15,884,911 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Please tell me whats wrong with function? PinPopular
Cedric Moonen17-Nov-10 0:57
Cedric Moonen17-Nov-10 0:57 
GeneralRe: Please tell me whats wrong with function? Pin
Le@rner17-Nov-10 1:00
Le@rner17-Nov-10 1:00 
GeneralRe: Please tell me whats wrong with function? Pin
Cedric Moonen17-Nov-10 1:06
Cedric Moonen17-Nov-10 1:06 
QuestionRe: Please tell me whats wrong with function? Pin
CPallini17-Nov-10 1:21
mveCPallini17-Nov-10 1:21 
JokeRe: Please tell me whats wrong with function? Pin
Code-o-mat17-Nov-10 2:08
Code-o-mat17-Nov-10 2:08 
GeneralRe: Please tell me whats wrong with function? Pin
CPallini17-Nov-10 2:16
mveCPallini17-Nov-10 2:16 
JokeRe: Please tell me whats wrong with function? Pin
Code-o-mat17-Nov-10 2:21
Code-o-mat17-Nov-10 2:21 
AnswerRe: Please tell me whats wrong with function? [modified] Pin
Alain Rist17-Nov-10 3:50
Alain Rist17-Nov-10 3:50 
His function signature is CString CSMTP::get_response() so the return statement will construct a CString with buf and return it. The problem is not in that construct, it was that buf was not null terminated as expected by the constructor. See previous thread for more Smile | :)

Edit: Just seen that the OP code now initializes buf to empty, so the problem is elsewhere, probably around a call to CMemFile::Free().

cheers,
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
modified on Wednesday, November 17, 2010 11:02 AM

GeneralRe: Please tell me whats wrong with function? Pin
CPallini17-Nov-10 5:26
mveCPallini17-Nov-10 5:26 
AnswerRe: Please tell me whats wrong with function? Pin
super17-Nov-10 2:23
professionalsuper17-Nov-10 2:23 
QuestionRe: Please tell me whats wrong with function? Pin
David Crow17-Nov-10 3:15
David Crow17-Nov-10 3:15 
Question#ifndef Pin
vidhyaej16-Nov-10 20:21
vidhyaej16-Nov-10 20:21 
AnswerRe: #ifndef Pin
Alain Rist16-Nov-10 21:04
Alain Rist16-Nov-10 21:04 
AnswerRe: #ifndef Pin
David Crow17-Nov-10 3:16
David Crow17-Nov-10 3:16 
QuestionHow can handle this exception? Pin
Le@rner16-Nov-10 19:00
Le@rner16-Nov-10 19:00 
AnswerRe: How can handle this exception? Pin
Alain Rist16-Nov-10 21:00
Alain Rist16-Nov-10 21:00 
GeneralRe: How can handle this exception? [modified] Pin
Le@rner16-Nov-10 21:06
Le@rner16-Nov-10 21:06 
GeneralRe: How can handle this exception? Pin
Cedric Moonen16-Nov-10 21:17
Cedric Moonen16-Nov-10 21:17 
GeneralRe: How can handle this exception? Pin
Alain Rist16-Nov-10 21:23
Alain Rist16-Nov-10 21:23 
GeneralRe: How can handle this exception? Pin
Le@rner16-Nov-10 22:41
Le@rner16-Nov-10 22:41 
GeneralRe: How can handle this exception? Pin
Cedric Moonen16-Nov-10 22:51
Cedric Moonen16-Nov-10 22:51 
AnswerRe: How can handle this exception? Pin
Alain Rist16-Nov-10 22:55
Alain Rist16-Nov-10 22:55 
GeneralRe: How can handle this exception? Pin
Le@rner16-Nov-10 23:15
Le@rner16-Nov-10 23:15 
GeneralRe: How can handle this exception? Pin
Cedric Moonen16-Nov-10 23:43
Cedric Moonen16-Nov-10 23:43 
GeneralRe: How can handle this exception? Pin
Alain Rist17-Nov-10 0:05
Alain Rist17-Nov-10 0:05 

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.