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

            導(dǎo)航

            <2006年5月>
            30123456
            78910111213
            14151617181920
            21222324252627
            28293031123
            45678910

            統(tǒng)計

            常用鏈接

            留言簿(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類型轉(zhuǎn)換為字符串類型
            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 深邃者 閱讀(368) 評論(1)  編輯 收藏 引用

            評論

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

            沒看懂什么意思  回復(fù)  更多評論   


            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            色欲久久久天天天综合网 | 婷婷久久五月天| 国产AⅤ精品一区二区三区久久| 99久久精品日本一区二区免费| 久久综合丁香激情久久| 欧美激情精品久久久久久久九九九| 久久精品aⅴ无码中文字字幕不卡 久久精品成人欧美大片 | 国产精品久久久久…| 狠狠人妻久久久久久综合| 久久天天躁狠狠躁夜夜2020一| 精品国产福利久久久| 亚洲欧美国产精品专区久久| 成人久久久观看免费毛片| 国产精品美女久久福利网站| 国产国产成人精品久久| 99久久免费国产精品特黄| 国产91久久综合| AV无码久久久久不卡蜜桃| 亚洲性久久久影院| 久久国产精品波多野结衣AV| 国产精品一久久香蕉产线看| 久久免费视频1| 合区精品久久久中文字幕一区 | 久久亚洲精品无码播放| 国产精品久久网| 久久综合给合久久国产免费| 久久综合久久美利坚合众国| 久久久久亚洲AV无码去区首| 99久久精品免费看国产一区二区三区 | 国产A级毛片久久久精品毛片| 国产精品免费久久| 久久精品国产99国产精品澳门| 国产精品美女久久久m| 国内精品伊人久久久久av一坑 | 久久久www免费人成精品| 伊人久久精品影院| 99久久国产亚洲综合精品| 18禁黄久久久AAA片| 一本色道久久99一综合| 麻豆成人久久精品二区三区免费| 五月丁香综合激情六月久久|