Question: why is the pointer value ( pChar = muэ ), the pointer is the same type, and here there are some letters. Help figure out why this behavior.
Code:
//4. указатель на указатель на char typedef char * myPointerChar; typedef myPointerChar * myPointerPointerChar; //char** int main() { myPointerChar pChar = /*&ch3*/ new char('m'); myPointerPointerChar ppChar = &pChar; std::cout << "myPointerChar pChar = " << pChar << " ;*myPointerChar *pChar = " << *pChar << "\n"; std::cout << "myPointerPointerChar ppChar = " << ppChar << " ;*myPointerPointerChar *ppChar = " << *ppChar << " ;**myPointerPointerChar **ppChar = " << **ppChar << "\n"; return 0; } Displayed value:
myPointerChar pChar = muэ ;*myPointerChar *pChar = m myPointerPointerChar ppChar = 0x61fe7c ;*myPointerPointerChar *ppChar = muэ ;**myPointerPointerChar **ppChar = m Question: why is the pointer value ( pChar = muэ ), the pointer is the same type, and here there are some letters. Help figure out why this behavior.