¡@

Home 

c++ Programming Glossary: pmyclass

Can I use shared library created in C++ in a C program?

http://stackoverflow.com/questions/14917952/can-i-use-shared-library-created-in-c-in-a-c-program

the function no problem since this is a CPP file. MyClass pMyClass static_cast MyClass pClassObj pMyClass setName pName nameLen.. a CPP file. MyClass pMyClass static_cast MyClass pClassObj pMyClass setName pName nameLen #extern C CPP Stuff goes here... or vice..

How to properly free the memory allocated by placement new?

http://stackoverflow.com/questions/8918791/how-to-properly-free-the-memory-allocated-by-placement-new

char sizeof MyClass Construct the object ourself MyClass pMyClass new pMemory MyClass The destruction of object is our duty. pMyClass.. new pMemory MyClass The destruction of object is our duty. pMyClass ~MyClass As far as I know operator delete normally calls the.. the memory right So why don't we use delete instead delete pMyClass what's wrong with that in the first case we are forced to set..