注册 登录
编程论坛 C++教室

字符型变量使用char进行声明,字符串型变量使用什么进行声明呢?

helloworld22 发布于 2008-11-16 11:37, 2422 次点击
字符型变量使用char进行声明,字符串型变量使用什么进行声明呢?
8 回复
#2
新浪2008-11-16 11:39
字符串没有 变量
#3
新浪2008-11-16 11:41
发错区了
#4
newyj2008-11-16 13:19
string
#5
p1s2008-11-16 13:20
char s[]="HelloWorld";
#6
p1s2008-11-16 13:22
如果面向对象的话,string也是可行的方法,参见《易学C++》第13章。
#7
helloworld222008-11-16 16:53
[bo][un]新浪[/un] 在 2008-11-16 11:41 的发言:[/bo]

发错区了


发错区了吗?
#8
cn472008-11-16 16:58
string可以试试,或用数组声明
#9
京广铁路2008-11-17 14:18
1