討論串[問題] 文章內搜尋字串
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者jsgame (jsgame)時間16年前 (2009/03/30 00:10), 編輯資訊
0
0
0
內容預覽:
char line[2048];. char tag[]="你要找的字";. int count=0;. ifstream fin("檔案名稱");//開啟檔案. while (!fin.eof()){. fin.getline(line,2048);. if(strstr(line,tag)){.
(還有52個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者legnaleurc (CA)時間16年前 (2009/03/29 23:45), 編輯資訊
0
0
1
內容預覽:
using namespace std;. struct Compare {. Compare( const string & s ) : s_( s ) {}. bool operator() ( const string & that ) {. return that.find( this->s
(還有345個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者cacaliang (caca)時間16年前 (2009/03/29 22:03), 編輯資訊
0
0
0
內容預覽:
想要在txt檔,文章字數不定的文章中,. 搜尋一個字串,並看它出現幾次。. 目前我幼兒般的程度只有辦法寫成這樣~. #include <iostream>. #include <fstream>. using namespace std;. int main(). {. ifstream infil
(還有821個字)
首頁
上一頁
1
下一頁
尾頁