• <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>

            road420

            導航

            <2013年7月>
            30123456
            78910111213
            14151617181920
            21222324252627
            28293031123
            45678910

            統計

            常用鏈接

            留言簿(2)

            隨筆檔案

            文章檔案

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            輸出程序注釋行

            ?

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

            void ?read( const ? string ?name);

            void ?read( const ? string ?name)
            {
            ifstream?file;
            char ?ch;
            char ? * s = new ? char ();
            file.open(name.c_str());
            // 講string類型轉換為字符串類型
            if (file.fail())
            {
            ??
            throw ?invalid_argument(name);
            }

            while ( ! file.eof())
            {
            ?
            int ?i = 0 ;
            ?file.
            get (ch);
            ?
            while (ch != ' / ' )
            ???file.
            get (ch);
            ?file.
            get (ch);
            ?
            if (ch != ' * ' )
            ???
            continue ;
            ?
            else
            ??file.
            get (ch);
            ??
            while (ch != ' * ' )
            ?
            {
            ??s[i
            ++ ] = ch;
            ??file.
            get (ch);
            ?}

            ?file.
            get (ch);
            ?
            if (ch == ' / ' )
            ?
            {?
            ??cout
            << s << endl;
            ??cout
            << flush;
            ??
            for ( int ?j = 0 ;j < i;j ++ )
            ????s[j]
            = ' * ' ;
            ?}

            ?
            else
            ??
            continue ;
            }

            file.close();
            ?delete?s;
            }


            int ?main()
            {
            const ? string ?fname = " 1.txt " ;
            try {
            ?read(fname);
            }
            catch ( const ?invalid_argument & ?e?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????) {
            ??cerr
            << " 不能打開該文件 " << fname << endl;
            ??exit(
            1 );
            }
            catch ( int ?e) {
            ???cerr
            << " 語法錯誤 " << endl;
            ???exit(
            1 );
            }

            return ? 0 ;
            }



            posted on 2006-05-09 22:08 深邃者 閱讀(377) 評論(1)  編輯 收藏 引用

            評論

            # re: 輸出程序注釋行 2013-07-23 17:27 歲月漫步

            沒看懂什么意思  回復  更多評論   

            亚洲国产成人久久综合一区77| 久久综合狠狠综合久久97色| 久久亚洲精品中文字幕| 99久久99久久精品国产片果冻| 久久精品中文字幕有码| 国内高清久久久久久| 久久九九精品99国产精品| 99久久免费国产精品| 亚洲va中文字幕无码久久不卡| 精品一久久香蕉国产线看播放| 国产成人久久AV免费| 女同久久| 久久久久久国产a免费观看不卡 | 国产91久久综合| 亚洲国产精品成人久久蜜臀 | 久久精品欧美日韩精品| 人妻无码精品久久亚瑟影视| 国产精品免费久久| 久久精品国产亚洲Aⅴ香蕉| 狠狠88综合久久久久综合网| 丁香狠狠色婷婷久久综合| 久久久久高潮毛片免费全部播放| yy6080久久| 国产情侣久久久久aⅴ免费| 久久国产精品77777| 久久久久国产精品| 亚洲国产精品无码久久久久久曰 | 97精品国产97久久久久久免费| 久久99精品国产99久久| 久久亚洲欧美日本精品| 国产99久久久国产精品小说| yy6080久久| 久久久久亚洲av成人网人人软件| 伊人久久大香线蕉AV一区二区| 欧美日韩精品久久久免费观看| 久久国产视屏| 精品久久久久久成人AV| 日韩久久久久久中文人妻| 久久精品中文字幕大胸| 人妻无码精品久久亚瑟影视| 国产福利电影一区二区三区久久久久成人精品综合 |