이제이포인터 및 주소
char *str = "Idle mind is a devil's workshop";
int nLen = strlen(str);
char* ptr;
ptr = new char[nLen+1];
strcpy(ptr,str);
cout<<ptr<<endl;//this wil print the string
을 고려하지만,이 캐릭터 라인의 주소를 인쇄 할 수 야해 아래의 예를
int nCount[2] = {5,10};
int* ptrInt;
ptrInt = nCount;
cout<<ptrInt<<Endl;//this will print the address of arrar nCount
을 고려하십시오. 나는 그 차이를 꽤 얻지 못하고있다.
표준 스트림은 다른 유형의 문자를 처리 할 수 있지만 그 대답은 내 답변에 추가하지 않을 것입니다. – AraK