首页 > 编程 > C++ > 正文

[C++中的C_str()函数用法]

2019-11-08 18:47:20
字体:
来源:转载
供稿:网友

http://blog.csdn.net/nancy_m/article/details/7583550

char c[20]; string s = "1234"; strcpy(c, s.c_str()); PRintf("%s",c); //printf("/n%d",result);

输出

1234
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选