c++ 输出string的问题 cout << string
来源:互联网 发布:日俄战争全史淘宝 编辑:程序博客网 时间:2024/06/01 21:41
原文:http://blog.csdn.net/id19870510/article/details/5316290
us.name = "123";
cout << us.name << endl;
=====================================
程序运行时报一个异常
C2679: binary '<<' : no operator defined which takes a right-hand operand of type
错误原因:在#include<iostream.h>中string类没有重载"<<"操作符.
cout << us.name.c_str() << endl;
0 0
- c++ 输出string的问题 cout << string
- c++ 输出string的问题 cout << string
- cout无法输出string 类型变量的问题
- c++ string问题 cout输出正常,printf输出乱码
- c++中cout能不能直接输出string
- c++string字符串的输出
- 输出string数组时遇到的问题
- int,String,数组的默认值输出问题
- cout << string 编译错误
- cout<<字符数组 getline(流,string,delimit character) 遇到的问题
- C++程序重载string类,使string类对象能进行+连接,cout输出
- C/C++的格式化输出(2)--cout
- 输出定长的string
- C++输出流cout的顺序问题
- char数据cout输出的一些问题。
- 一个cout输出引发的问题
- vs2013输出string类问题
- c#string注意问题
- redhat enterprise linux : how to use yum
- 早知道早幸福——从压测工具谈并发、压力、吞吐量
- 20161116Linux nc说明
- hdu2070
- Android VideoView播放MP4视频文件
- c++ 输出string的问题 cout << string
- Android 串口编程原理和实现方式(附源码)
- P2P在NAT和防火墙上的穿透
- postgresql新手入门
- caffe源码 之 卷积层实现
- JavaScript Array-like 的对象集合
- C++ 范围for 不能用下标形式添加元素,只能用push_back
- easyUI datagrid列的取值问题
- 项目总结