• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Life & Code

            代碼是咒語,我是魔法師

            詳細解說STL系列之string之家庭作業. 哈哈. :)

            家庭作業:

            #include <string>
            #include <iostream>
            #include <algorithm>
            #include <vector>
            #include <fstream>
            using namespace std;

            int _tmain(int argc, _TCHAR* argv[])
            {
            ? ? ? ? ifstream in("c:\\teststring.txt" ) ;

            ? ? ? ? string??strtmp;
            ? ? ? ? string??strset = "| ,";

            ? ? ? ? while(getline(in, strtmp, '\n'))
            ? ? ? ? {
            ? ? ? ? ? ? ? ? size_t pos1 = 0;
            ? ? ? ? ? ? ? ? size_t pos2 = 0;
            ? ? ? ? ? ? ? ? while(true)
            ? ? ? ? ? ? ? ? {
            ? ? ? ? ? ? ? ? ? ? ? ? pos1 = strtmp.find_first_not_of(strset,pos2);
            ? ? ? ? ? ? ? ? ? ? ? ? if( pos1 == string::npos)
            ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;
            ? ? ? ? ? ? ? ? ? ? ? ? pos2 = strtmp.find_first_of(strset,pos1);
            ? ? ? ? ? ? ? ? ? ? ? ? cout << strtmp.substr(pos1, pos2 - pos1 )<<"??";
            ? ? ? ? ? ? ? ? }
            ? ? ? ? ? ? ? ? cout <<endl;
            ? ? ? ? }
            ? ? ? ? return 0;
            }

            //c:\\teststring.txt
            張三|3456123, 湖南
            李四,4564234| 湖北
            王小二, 4433253|北京

            posted on 2006-04-11 11:33 橙子 閱讀(290) 評論(0)  編輯 收藏 引用 所屬分類: C++ & STL

            <2006年6月>
            28293031123
            45678910
            11121314151617
            18192021222324
            2526272829301
            2345678

            導航

            統計

            常用鏈接

            留言簿(10)

            隨筆分類

            隨筆檔案

            相冊

            收藏夾

            搜索

            最新評論

            閱讀排行榜

            久久99这里只有精品国产| 国产精品午夜久久| 欧美噜噜久久久XXX| 久久99精品国产99久久| 久久久久免费视频| 国产成人综合久久综合| 婷婷久久香蕉五月综合加勒比 | 一个色综合久久| 国内精品久久久久伊人av| 久久亚洲国产最新网站| 99久久国产亚洲高清观看2024 | 精品久久久久久无码国产| 久久国产成人精品麻豆| 伊人久久大香线蕉av不卡| 亚洲伊人久久精品影院| 亚洲欧美另类日本久久国产真实乱对白| 97热久久免费频精品99| 国产69精品久久久久观看软件| 久久99国产精品成人欧美| 777久久精品一区二区三区无码| 亚洲国产美女精品久久久久∴| 色婷婷噜噜久久国产精品12p| 思思久久99热免费精品6| 亚洲综合婷婷久久| 青青草国产精品久久久久| 国产精品成人久久久久三级午夜电影| 久久综合综合久久综合| 亚洲午夜久久久影院| 亚洲级αV无码毛片久久精品| 亚洲人成伊人成综合网久久久| 久久久噜噜噜久久中文字幕色伊伊 | 久久精品国产亚洲AV蜜臀色欲| 无码人妻久久一区二区三区蜜桃| 久久青青国产| 久久亚洲sm情趣捆绑调教| 国内精品久久国产| 五月丁香综合激情六月久久| 青青草原精品99久久精品66| 99久久免费国产精精品| 久久成人精品| 久久天天躁狠狠躁夜夜不卡|