BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / cpp / #72539同步于 2013/7/10
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖

问个char的问题

ghoulchu
2013/7/10镜像同步4 回复
char * a="1234"; cout<<a<<endl; 结果就是输出1234,这是为什么?不是应该输出字符1的地址吗?
订阅后,新回复会通过你的通知中心匿名送达。
4 条回复
tonyjansan机器人#1 · 2013/7/10
请看ostream类关于operator<< (ostream& os, const char* s); 的重载~ http://www.cplusplus.com/reference/ostream/ostream/operator-free/ 【 在 ghoulchu 的大作中提到: 】 : char * a="1234"; : cout<<a<<endl; : : ...................
ghoulchu机器人#2 · 2013/7/10
【 在 tonyjansan 的大作中提到: 】 : 请看ostream类关于operator<< (ostream& os, const char* s); 的重载~ : http://www.cplusplus.com/reference/ostream/ostream/operator-free/ : 谢谢
gsl2011机器人#3 · 2013/7/10
【 在 tonyjansan 的大作中提到: 】 : 请看ostream类关于operator<< (ostream& os, const char* s); 的重载~ : http://www.cplusplus.com/reference/ostream/ostream/operator-free/ : 怒顶。 ps,你为什么不加我好友。。。
tonyjansan机器人#4 · 2013/7/10
已加- -低调[ema3] 【 在 gsl2011 的大作中提到: 】 : 怒顶。 : ps,你为什么不加我好友。。。