20140310 字符串比较 文件读写

1、两个字符串比较是第一个不相同的字符

2、char *address=(char *)malloc(len+1);

3、txt文件的读写操作:in和out都是相对内存而言的

#include<iostream>
#include<fstream>
#include<string>


void main()
{
char *listname="./result.txt";
std::ifstream in(listname);
std::string filename;
in>>filename;
std::cout<<filename<<std::endl;
std::ofstream out("Test/result.txt");
out<<"33333"<<std::endl;
out<<"33222"<<std::endl;

}

posted @ 2014-03-10 22:02  yexuannan  阅读(157)  评论(0编辑  收藏  举报