• <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年5月>
            27282930123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567

            統(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   管理


            精品多毛少妇人妻AV免费久久| 国内精品伊人久久久久网站| 久久亚洲春色中文字幕久久久| 国产精品日韩深夜福利久久| 久久精品无码专区免费青青| 亚洲人成精品久久久久| 久久这里都是精品| 日韩影院久久| 人妻无码精品久久亚瑟影视| 国产午夜福利精品久久| 品成人欧美大片久久国产欧美...| 成人资源影音先锋久久资源网| 久久精品国产亚洲av影院| 亚洲AV乱码久久精品蜜桃| 欧美亚洲色综久久精品国产| 婷婷五月深深久久精品| 精品久久久久中文字幕日本| 亚洲国产精品久久久天堂| 国产精品一区二区久久国产 | 青青青青久久精品国产h| 久久久精品午夜免费不卡| 国产高清美女一级a毛片久久w| 久久精品国产福利国产琪琪| 狠狠色丁香久久婷婷综合蜜芽五月 | 中文字幕亚洲综合久久2| 国产成人精品久久综合| 久久久久九九精品影院| 久久乐国产综合亚洲精品| 久久精品无码午夜福利理论片| 国产精品欧美久久久天天影视| 久久久99精品一区二区| 亚洲色欲久久久综合网| 99久久精品九九亚洲精品| 蜜臀久久99精品久久久久久| 久久久久久久久无码精品亚洲日韩| 久久综合九色综合久99| 无码8090精品久久一区| 99热成人精品热久久669| 久久综合狠狠综合久久| 婷婷久久综合九色综合绿巨人| 久久久精品国产免大香伊 |