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

            <2025年8月>
            272829303112
            3456789
            10111213141516
            17181920212223
            24252627282930
            31123456

            統(tǒng)計(jì)

            常用鏈接

            留言簿(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
            << " 語法錯(cuò)誤 " << endl;
            ???exit(
            1 );
            }

            return ? 0 ;
            }



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

            評論

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

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


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


            久久亚洲国产精品123区| 久久99热这里只有精品国产| 国产成人精品久久| 久久精品人人做人人妻人人玩| 久久国产乱子精品免费女| 久久久国产精华液| 国产精品一区二区久久国产| 久久99精品免费一区二区| 久久亚洲AV无码精品色午夜麻豆 | 2021久久精品国产99国产精品| 国产精品禁18久久久夂久| 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 色天使久久综合网天天| 亚洲一区中文字幕久久| 成人久久免费网站| 亚洲欧美一级久久精品| 中文字幕亚洲综合久久| 精品久久久久久无码中文字幕一区 | 99久久超碰中文字幕伊人| 国产精品美女久久福利网站| 久久精品国产亚洲5555| 99久久99久久| 久久精品人人槡人妻人人玩AV| 中文字幕久久精品无码| 国产精品一区二区久久精品涩爱 | 久久美女网站免费| 2021精品国产综合久久| 国产精品九九九久久九九| 91精品国产9l久久久久| 久久国产精品无码HDAV| 69国产成人综合久久精品| 99999久久久久久亚洲| 九九精品99久久久香蕉| 无码超乳爆乳中文字幕久久| 伊人久久大香线焦AV综合影院| 久久精品国产免费观看 | 日韩十八禁一区二区久久| 亚洲国产精品无码久久青草| 伊人久久大香线蕉成人| 亚洲国产视频久久| 亚洲∧v久久久无码精品|