#include <iostream>
int main()
{
char* s1 = new char('a');
char s2 = { 'a' };
char* s3 = new char[10];
const char* s4 = "aaa";
char* s5 = new char[4]{ "aaa" };
*s5 = 'n';
char* s6 = const_cast<char*>( "aaa" );
//*s6 = 'n';
char s7[3] = {'a','a','a'};
*s7 = 'n';
}
关于c++ char char*
最新推荐文章于 2023-08-31 11:39:37 发布