自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 .eof() 以及std::getline(ifstream &, string &)

#include #include #include using namespace std; int main(){    ifstream infile("abc.txt");    if(!infile) {}     ofstream outfile("out.txt");    string str;    for(int i=0; i

2009-08-20 10:39:00 1934 1

转载 zz头文件sstream,strstream的区别

 以前一直以为这两个就是一个样的,就名字的区别而已,今天编了个小程序,发现好象跟我想象的不大一样,请高手指点! C/C++ code#include #include #include #include using namespace std;//将整型转换成字符型string int_to_string(int i){    ostringstream os;    os    re

2009-07-13 19:31:00 1105

原创 getline函数的一点瓜葛

 C++仍然有基本的字符数组,同时又有string这种数据类型(C++串,不是STL),前者大小固定,后者可以不固定。1. 作为友元函数的getline(istream, str)    比如论坛上常见的: string Str; getline(cin,Str);//从键盘读入一行到C++串Str    其实还有: ifstream infile("abc.t

2009-07-12 14:18:00 396

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除