#include <Windows.h> #include <iostream> using namespace std; int main(void) { unsigned char* pFoo = new unsigned char[1000];
I want todelete a char * array, which should be simple right? char * = new char[length]; then use delete[] char;?
I\'m having a bit of a problem with a try-catch situation, here goes the code (it\'s pretty simple): struct Something
I am new to C++ and I have something unclear: #include <iostream> using namespace std; double* foo(void)
Doing this: union{ int * integer; char * character; } u; u.integer = new in开发者_如何学Pythont; delete u.character;
This question already has answers here: Closed 11 years ago. Possible Duplicate: Is there any way to determine the size of a C++ array programmatical开发者_如何学Cly? And if not, why?
I have a LinkedList with a Node that have a field: void* _data; Now, I want to delete this data, but i cant know if the data will be a primitive or an object that was dynamically allocated.
Given the following : #include <iostream> using namespace std; class A { public: void func() {delete this;}
I have a class Foo, which has a (simple) destructor. Some other class contains an array of Foo objects (called foolist), in the destructor of that class, I do:
IFSUPCUTILSize* size = NULL; CoCreateInstance(CLSID_UTILSize, NULL, CLSCTX_INPROC_SERVER, IID_IFSUPCUTILSize,reinterpret_cast<void**>(&size));