C++ (Qt)void Test( const char *& src ){} int main(){ char * test = new char[128];// const char * test = new char[128]; // Ok Test(test); return 0;}
C++ (Qt)void Test1( const char * src ){ ++src; // ok src[0] = 0; // error}
C++ (Qt)void Test1( const char *& src ){ ++src; // ok src[0] = 0; // error}
C++ (Qt)typedef char * Ptr;typedef const char * CPtr; void Test( CPtr & src ); Ptr src;Test(src); // error
C++ (Qt)Object * obj = new Object;Object & ref = *obj;..delete obj; // ref is not longer valid