Click here to Skip to main content
16,004,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to place the new mail in outbox of outlook programatically Pin
Rajesh match11-Apr-04 20:28
Rajesh match11-Apr-04 20:28 
AnswerRe: How to place the new mail in outbox of outlook programatically Pin
David Crow12-Apr-04 4:19
David Crow12-Apr-04 4:19 
GeneralRe: How to place the new mail in outbox of outlook programatically Pin
Rajesh match12-Apr-04 4:29
Rajesh match12-Apr-04 4:29 
GeneralRe: How to place the new mail in outbox of outlook programatically Pin
David Crow12-Apr-04 5:13
David Crow12-Apr-04 5:13 
Questionwhy to initialize like this ? Pin
vividtang11-Apr-04 20:08
vividtang11-Apr-04 20:08 
AnswerRe: why to initialize like this ? Pin
Maxwell Chen11-Apr-04 20:28
Maxwell Chen11-Apr-04 20:28 
AnswerRe: why to initialize like this ? Pin
toxcct11-Apr-04 22:34
toxcct11-Apr-04 22:34 
GeneralRe: why to initialize like this ? Pin
John R. Shaw11-Apr-04 23:00
John R. Shaw11-Apr-04 23:00 
VERY WRONG m_strName = szName is not coping the address of the string, unless m_szName is a pointer. You can not copy use strcpy, unless the m_strName object already contains a string that is as long or longer than the string you are coping to it. He has various choices:
CStudent::CStudent(const char* szName, int nGrade) : m_strName(szName), m_nGrade(nGrade)
{}

CStudent::CStudent(const char* szName, int nGrade) : m_strName(szName)
{ m_nGrade = nGrade; }

CStudent::CStudent(const char* szName, int nGrade) : m_nGrade(nGrade)
{ strName = strName }

CStudent::CStudent(const char* szName, int nGrade)
{  m_strName = szName; m_nGrade = nGrade; }


But strcpy is not one of them. Of course your answer and mine have nothing to do with the actual question.

Sorry, but you scared me with your answer.

INTP
GeneralRe: why to initialize like this ? Pin
toxcct12-Apr-04 3:38
toxcct12-Apr-04 3:38 
GeneralRe: why to initialize like this ? Pin
John R. Shaw12-Apr-04 11:45
John R. Shaw12-Apr-04 11:45 
GeneralRe: why to initialize like this ? Pin
toxcct12-Apr-04 21:29
toxcct12-Apr-04 21:29 
AnswerRe: why to initialize like this ? Pin
vividtang12-Apr-04 2:08
vividtang12-Apr-04 2:08 
GeneralRe: why to initialize like this ? Pin
Paul Ranson13-Apr-04 1:47
Paul Ranson13-Apr-04 1:47 
GeneralWindows Msg Pin
Shenthil11-Apr-04 19:32
Shenthil11-Apr-04 19:32 
GeneralRe: Windows Msg Pin
Prakash Nadar11-Apr-04 22:17
Prakash Nadar11-Apr-04 22:17 
GeneralRe: Windows Msg Pin
SiddharthAtw11-Apr-04 23:34
SiddharthAtw11-Apr-04 23:34 
Generalabout IPC plant Pin
Member 101286911-Apr-04 19:08
Member 101286911-Apr-04 19:08 
QuestionWhat Code Browser & Source Control To Use? Pin
bitpusher11-Apr-04 18:53
bitpusher11-Apr-04 18:53 
AnswerRe: What Code Browser & Source Control To Use? Pin
The Bowman12-Apr-04 7:10
The Bowman12-Apr-04 7:10 
Generalfail to declare IHTMLDocument2 Pin
yanuart11-Apr-04 17:23
yanuart11-Apr-04 17:23 
Questionhow to use MFC in a win32 prog Pin
tank102511-Apr-04 17:18
tank102511-Apr-04 17:18 
AnswerRe: how to use MFC in a win32 prog Pin
Maxwell Chen11-Apr-04 17:20
Maxwell Chen11-Apr-04 17:20 
GeneralRe: how to use MFC in a win32 prog Pin
Rahul20067612-Apr-04 6:02
Rahul20067612-Apr-04 6:02 
GeneralRe: how to use MFC in a win32 prog Pin
Maxwell Chen12-Apr-04 7:12
Maxwell Chen12-Apr-04 7:12 
Questionhow to set a NULL DACL Pin
tank102511-Apr-04 17:13
tank102511-Apr-04 17:13 

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.