• <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年4月>
            31123456
            78910111213
            14151617181920
            21222324252627
            2829301234
            567891011

            統計

            常用鏈接

            留言簿(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 歲月漫步

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

            久久综合伊人77777| 国产高潮国产高潮久久久91| 久久热这里只有精品在线观看| 久久综合九色综合欧美就去吻| 久久香蕉一级毛片| 亚洲午夜久久久久久噜噜噜| 国产精品美女久久久网AV| 久久婷婷色香五月综合激情| 国产三级精品久久| 亚洲级αV无码毛片久久精品| 亚洲欧美一级久久精品| 99久久亚洲综合精品网站| 色妞色综合久久夜夜| 色欲综合久久中文字幕网| 久久精品综合一区二区三区| 久久99国产精品一区二区| 狠狠色丁香婷婷久久综合不卡| 色婷婷久久综合中文久久一本| 手机看片久久高清国产日韩| 国产日产久久高清欧美一区| 人妻丰满AV无码久久不卡| 人妻少妇精品久久| 久久精品无码一区二区日韩AV| 久久99国产亚洲高清观看首页 | 国产激情久久久久影院小草 | 日韩精品久久无码人妻中文字幕| 国产精品永久久久久久久久久| 久久成人国产精品| 91久久精一区二区三区大全| 久久99中文字幕久久| 久久久久女人精品毛片| 久久精品国产清高在天天线| 久久婷婷五月综合色高清 | 亚洲天堂久久久| 久久久久久国产a免费观看不卡| 国产2021久久精品| 久久久久99精品成人片三人毛片 | 国内精品久久久久影院网站| 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 亚洲va久久久噜噜噜久久狠狠 | 亚洲一区中文字幕久久|