char
*p1 =
"hello"
;
char
*p2 =
"world"
;
char
*p3 =
"a piece of cake"
;
char
*str[] = { p1, p2, p3 };
cout <<
sizeof
(*str[0]) <<
" "
<<
typeid
(str[0]).name() <<
" "
<< *(str[0] + 1) << endl;
//typeid是类型
cout <<
sizeof
(*&str[0]) <<
" "
<<
typeid
(&str[0]).name() <<
" "
<< *(&str[0] + 1) << endl;
cout <<
sizeof
(*str) <<
" "
<<
typeid
(str).name() <<
" "
<< *(str + 1) << endl;
cout <<
sizeof
(*&str) <<
" "
<<
typeid
(&str).name() <<
" "
<< *(&str + 1) << endl;
return
0;