C++中char *和char 的区别

2025-04-09 11:07:32
推荐回答(1个)
回答1:

char * 是用来定义一个字符串变量的类型,如char * ptr = "hello C++";

char 是定义字符变量的类型,如char ch = 'A'。