c++ - Compiler in endless loop
- Heinz Saathoff (22/22) Dec 14 2005 Hello,
Hello, when compiling folowing example with DMC V8.44.6n the compiler reports the unknown pointer in the destructor of template PADEL and then hangs. It can only be terminated by Control-C Example: template<class T> class PADEL { public: PADEL(T* p) : ptr(p) {} ~PADEL() {delete[] p;} // p is mistake, wanted ptr private: T *ptr; }; int main() { int *ip = new int[10]; PADEL<int> ip_care(ip); return 0; } I know that I don't have the latest version. So if it's already solved I will download the latest DMC. - Heinz
Dec 14 2005