摘要: #include <iostream>#include <string>#include <stack>#include <fstream>using namespace std;char *pSrc = NULL;char *pDest = NULL;stack<char> s1;char res[1000];int cnt = 0;void work(){ if(*pDest == '/0'){ for(int i = 0; i < cnt; i++){ cout << res[i] <&l 阅读全文
posted @ 2009-09-01 23:06 zhwj184 阅读(144) 评论(0) 推荐(0) 编辑
摘要: java io写文件时写到文件的中文都成乱码,在windows是没问题的,主要是linux下默认字符集是utf-8,而windows默认编码是gbk,所以java 往文件里面写入中文时是根据系统默认字符集来写的。可以有两种方法,1.在java io往文件写时强制用系统编码写,StringfileEncode=System.getProperty("file.encoding");FileoutFile=newFile(path+separator+fileName);if(!outFile.exists()){outFile.createNewFile();}else{ou 阅读全文
posted @ 2009-09-01 13:09 zhwj184 阅读(536) 评论(0) 推荐(0) 编辑