Click here to Skip to main content
15,914,394 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: new ClassX() versus new ClassX syntax Pin
Neelesh K J Jain23-Sep-05 6:48
Neelesh K J Jain23-Sep-05 6:48 
GeneralRe: new ClassX() versus new ClassX syntax Pin
Jörgen Sigvardsson23-Sep-05 7:39
Jörgen Sigvardsson23-Sep-05 7:39 
AnswerRe: new ClassX() versus new ClassX syntax Pin
Alexander M.,23-Sep-05 7:49
Alexander M.,23-Sep-05 7:49 
AnswerRe: new ClassX() versus new ClassX syntax Pin
toxcct23-Sep-05 7:50
toxcct23-Sep-05 7:50 
GeneralRe: new ClassX() versus new ClassX syntax Pin
Jörgen Sigvardsson23-Sep-05 10:55
Jörgen Sigvardsson23-Sep-05 10:55 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
ddmcr23-Sep-05 10:58
ddmcr23-Sep-05 10:58 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
toxcct24-Sep-05 5:40
toxcct24-Sep-05 5:40 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
ddmcr24-Sep-05 8:58
ddmcr24-Sep-05 8:58 
toxcct wrote:
never...

just try ,
Declare class

CClassX
{
public : 
    int x;
    double y;
};


and then in main construct two objects on the heap

...
CClassX* pC1 = new CClassX();
CClassX* pC2 = new CClassX;
...

and try
cout<<pC1->x<<" "<<pC1->y;//here output will be 0 0
cout<<pC2->x<<" "<<pC2->y; //here output will be random numbers




"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill


GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
Jörgen Sigvardsson25-Sep-05 0:17
Jörgen Sigvardsson25-Sep-05 0:17 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
ddmcr25-Sep-05 7:27
ddmcr25-Sep-05 7:27 
QuestionRecord sound Pin
bulgaa23-Sep-05 4:19
bulgaa23-Sep-05 4:19 
AnswerRe: Record sound Pin
Alexander M.,24-Sep-05 8:59
Alexander M.,24-Sep-05 8:59 
QuestionCoInitializeEx and failure about document establishes Pin
Tcpip200523-Sep-05 3:47
Tcpip200523-Sep-05 3:47 
QuestionBSTR to char[] Pin
Eytukan23-Sep-05 3:40
Eytukan23-Sep-05 3:40 
AnswerRe: BSTR to char[] Pin
Phil J Pearson23-Sep-05 4:06
Phil J Pearson23-Sep-05 4:06 
AnswerRe: BSTR to char[] Pin
prasad_som23-Sep-05 4:14
prasad_som23-Sep-05 4:14 
Answernot done :( Pin
Eytukan23-Sep-05 4:21
Eytukan23-Sep-05 4:21 
AnswerRe: BSTR to char[] Pin
Kharfax23-Sep-05 9:01
Kharfax23-Sep-05 9:01 
Questionoffscreen GUI Pin
JChui23-Sep-05 2:59
JChui23-Sep-05 2:59 
QuestionInsert at Cursor position in CEdit Pin
vikas amin23-Sep-05 2:20
vikas amin23-Sep-05 2:20 
AnswerRe: Insert at Cursor position in CEdit Pin
vikas amin23-Sep-05 2:21
vikas amin23-Sep-05 2:21 
AnswerRe: Insert at Cursor position in CEdit Pin
Chris Losinger23-Sep-05 2:23
professionalChris Losinger23-Sep-05 2:23 
GeneralRe: Insert at Cursor position in CEdit Pin
vikas amin23-Sep-05 2:54
vikas amin23-Sep-05 2:54 
GeneralRe: Insert at Cursor position in CEdit Pin
David Crow23-Sep-05 3:27
David Crow23-Sep-05 3:27 
GeneralRe: Insert at Cursor position in CEdit Pin
Eytukan23-Sep-05 3:50
Eytukan23-Sep-05 3:50 

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.