C++ (Qt)Object * obj = new Object;Object & ref = *obj;..delete obj; // ref is not longer valid
C++ (Qt)Object obj;memset(&obj, 0, 100500);
C++ (Qt)void Test( const char *& src ){} int main(){ char * test = new char[128]; Test((const char *&) test); return 0;}
typedef char * Ptr;typedef const char * CPtr;void Test( const CPtr & src ) {}int main(int argc, char *argv[]){ Ptr src; Test(src); // ok return 0;}
C++ (Qt) int main(){ char * test = new char[128]; Test(const_cast<const char *&>(test)); return 0;}
C++ (Qt)void Test( const char *& src );
C++ (Qt)void Test( const char *& src ){} int main(){ char * test = new char[128]; const char * testConst = test; Test(testConst ); return 0;}
C++ (Qt)test = const_cast<char *> (testConst);
C++ (Qt)void Test( const char *& src ){ cout << *src++ << endl; cout << *src++ << endl;}
C++ (Qt)const char *Test(const char*)