"dcb314 at hotmail dot com" <[EMAIL PROTECTED]> writes: | Given the following C++ code | | class K | { | public: | void f(); | void g(); | | private: | int * a; | double * b; | float * c; | unsigned int * d; | }; | | void K :: f() | { | a = new int; | b = new double [ 10]; | delete c; | delete [] d; | } | | void K :: g() | { | delete [] a; // error | delete b; // error | c = new float [ 20]; // error | d = new unsigned int; // error | } | | Recent snapshot g++ 4.3 20070803 can't find anything | wrong with the code.
Special, dedicated tools exist for that task. I would suggest you use one of them. The above should not be the business of the *compiler*. -- Gaby