Click here to Skip to main content
15,922,427 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: In Win32 OS, is single-precsion float faster than double? Pin
Sean old school game guy7-May-12 10:55
Sean old school game guy7-May-12 10:55 
QuestionFmod include errors Pin
Member 79972644-Apr-12 13:55
Member 79972644-Apr-12 13:55 
AnswerRe: Fmod include errors Pin
Richard Andrew x644-Apr-12 17:40
professionalRichard Andrew x644-Apr-12 17:40 
QuestionVC++: cant manipulate forms Pin
Member 875813424-Mar-12 22:05
Member 875813424-Mar-12 22:05 
AnswerRe: VC++: cant manipulate forms Pin
f907334125-Mar-12 7:17
f907334125-Mar-12 7:17 
AnswerRe: VC++: cant manipulate forms Pin
Albert Holguin25-Mar-12 15:12
professionalAlbert Holguin25-Mar-12 15:12 
QuestionReading connection string from App.config using LINQ Pin
Wheels01219-Mar-12 4:37
Wheels01219-Mar-12 4:37 
AnswerRe: Reading connection string from App.config using LINQ Pin
Eddy Vluggen5-Apr-12 1:31
professionalEddy Vluggen5-Apr-12 1:31 
GeneralRe: Reading connection string from App.config using LINQ Pin
Wheels0125-Apr-12 2:08
Wheels0125-Apr-12 2:08 
Suggestionhelp a beginner please Pin
invincible bar17-Mar-12 23:47
invincible bar17-Mar-12 23:47 
GeneralRe: help a beginner please Pin
Richard MacCutchan18-Mar-12 2:20
mveRichard MacCutchan18-Mar-12 2:20 
GeneralRe: help a beginner please Pin
Albert Holguin21-Mar-12 7:50
professionalAlbert Holguin21-Mar-12 7:50 
QuestionPlease explain below code.... Pin
Member 154408715-Mar-12 5:44
Member 154408715-Mar-12 5:44 
AnswerRe: Please explain below code.... Pin
Richard MacCutchan15-Mar-12 6:03
mveRichard MacCutchan15-Mar-12 6:03 
GeneralRe: Please explain below code.... Pin
Member 154408715-Mar-12 6:22
Member 154408715-Mar-12 6:22 
GeneralRe: Please explain below code.... Pin
Richard MacCutchan15-Mar-12 6:54
mveRichard MacCutchan15-Mar-12 6:54 
Questionwhy construction called when i overload the operator new in c++ by calling malloc Pin
AARON_ZXF2-Mar-12 23:05
AARON_ZXF2-Mar-12 23:05 
hi:
i overload the operator new, codes shown as below:

void * __cdecl operator new(unsigned int size, const char *file, int line)
{
void *ptr = (void *)malloc(size);

return ptr;
}

and when i want to create a class object

CTest::CTest()
{
int a = 0;
}
CTest::~CTest()
{
int b = 0;
}

int main()
{
CTest* test = new CTest;
delete test;
return 0;
}

it is very obvious that i overload the operator new by malloc, so when i use the overloaded new operator to create a class object, the CTest's construction should not be called, while the result is complete opposite. And
my question: why the class's construction function can be called when i create it by malloc but not new?
AnswerRe: why construction called when i overload the operator new in c++ by calling malloc Pin
Richard MacCutchan2-Mar-12 23:16
mveRichard MacCutchan2-Mar-12 23:16 
GeneralRe: why construction called when i overload the operator new in c++ by calling malloc Pin
Albert Holguin21-Mar-12 8:50
professionalAlbert Holguin21-Mar-12 8:50 
GeneralRe: why construction called when i overload the operator new in c++ by calling malloc Pin
Richard MacCutchan27-Mar-12 22:03
mveRichard MacCutchan27-Mar-12 22:03 
AnswerRe: why construction called when i overload the operator new in c++ by calling malloc Pin
Philippe Mori3-Mar-12 5:09
Philippe Mori3-Mar-12 5:09 
AnswerRe: why construction called when i overload the operator new in c++ by calling malloc Pin
Albert Holguin21-Mar-12 8:45
professionalAlbert Holguin21-Mar-12 8:45 
AnswerRe: why construction called when i overload the operator new in c++ by calling malloc Pin
Philippe Mori6-Apr-12 14:43
Philippe Mori6-Apr-12 14:43 
QuestionIs it safe to pass CComVariant declared locally ot other function Pin
ptr_Electron21-Feb-12 1:57
ptr_Electron21-Feb-12 1:57 
QuestionMouseEnter and MouseLeave Events Pin
Lucidation20-Feb-12 11:54
Lucidation20-Feb-12 11:54 

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.