• <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>
            數(shù)據(jù)加載中……

            2014年7月5日

            博客搬家了,新的博客地址 www.k-door.com

            新的博客地址 www.k-door.com

            posted @ 2014-07-05 18:22 Stone xin 閱讀(181) | 評論 (0)編輯 收藏

            2013年6月27日

            【原創(chuàng)】warning no newline at end of file 的解決辦法

                 摘要:   閱讀全文

            posted @ 2013-06-27 13:44 Stone xin 閱讀(1109) | 評論 (0)編輯 收藏

            2013年5月3日

            【原創(chuàng)】正確使用map的erase方法【修正版】

            在好多不負責任的博客中普及了一些錯誤的map刪除元素的方法。
            現(xiàn)在給出糾正。

            首先,map的erase方法有三種形式

            (1)
             void erase (iterator position); 
            (2)
                 size_type erase (const key_type& k); 
            (3)
             void erase (iterator first, iterator last);

            第3種沒有什么歧義,不用細說了。
            最有歧義的就是第一種和第二種。

            有返回值的接口,是刪除key為參數(shù)的。返回值是刪除的數(shù)量。因為map中key不會重復,所以,如果key存在,則返回的是1,否則,返回是0;

            如果是調用的iter接口,則刪除的是迭代器位置的元素。
            如果只刪除一個元素,直接 map.erase(iter);就好了。
            如果用循環(huán)。
            while(iter!=map.end)
            {
                if(condition)
               {
                  map.erase(iter++);
               }else{
                  ++iter;   
               }
            }
            官方手冊地址:
            http://www.cplusplus.com/reference/map/map/erase/

            posted @ 2013-05-03 11:29 Stone xin 閱讀(2137) | 評論 (0)編輯 收藏

            2013年2月18日

            開源圖形庫 c語言-圖形圖像庫 集合[轉]

                 摘要: Google三維API O3D  O3D 是一個開源的 Web API 用來在瀏覽器上創(chuàng)建界面豐富的交互式的 3D 應用程序。這是一種基于網(wǎng)頁的可控3D標準。此格式期望真正的基于瀏覽器,獨立于操作系統(tǒng)之外,并且支持主流的3D顯卡,這樣就可以在網(wǎng)頁中實現(xiàn)效果逼真的3D動畫。在線演示:http://o3... 更多O3D信息   最新新聞: 谷歌聯(lián)手Mozilla基金開發(fā)3D互聯(lián)網(wǎng)圖像技術發(fā)...  閱讀全文

            posted @ 2013-02-18 15:28 Stone xin 閱讀(5264) | 評論 (0)編輯 收藏

            2012年12月12日

            實現(xiàn)簡單的POST數(shù)據(jù)【修正版】

                 摘要: 實現(xiàn)簡單的POST數(shù)據(jù)【修正版】  閱讀全文

            posted @ 2012-12-12 17:46 Stone xin 閱讀(424) | 評論 (0)編輯 收藏

            2012年11月20日

            Chrome所涉及26個開源代碼

                 摘要: Chrome所涉及26個開源代碼  閱讀全文

            posted @ 2012-11-20 21:48 Stone xin 閱讀(427) | 評論 (0)編輯 收藏

            2012年9月1日

            [轉載]windows路徑操作API函數(shù)

                 摘要: windows路徑操作API函數(shù)  閱讀全文

            posted @ 2012-09-01 14:56 Stone xin 閱讀(5667) | 評論 (0)編輯 收藏

            2012年5月17日

            Windows程序增加控制臺

            #include "StdAfx.h"
            #include "Console4GUI.h"


            Console4GUI::Console4GUI(void)
            {
                AllocConsole();   // Create a new console window 

                int hCrun;    
                hCrun = _open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE),_O_TEXT);
                FILE    *file  = _fdopen(hCrun, "w");

                // use default stream buffer
                setvbuf(file, NULL, _IONBF, 0);
                *stdout = *file;

                std::cout<<"控制臺啟動"<<std::endl;
            }

            Console4GUI::~Console4GUI(void)
            {
                FreeConsole();  // Close the console window  
            }
            #pragma once
            #include <fcntl.h>
            #include <io.h>
            #include <iostream>
            class Console4GUI
            {
            public:
                Console4GUI(void);
                ~Console4GUI(void);
            };

            posted @ 2012-05-17 16:58 Stone xin 閱讀(355) | 評論 (0)編輯 收藏

            不定長參數(shù)格式化輸出(支持中文字符)

            #include <iostream>
            #include <string>
            void myformat(const char *fmt, )
            {
            va_list ap;
            va_start(ap, fmt);
            wchar_t buf[2048];
            vswprintf(buf,fmt,ap);
            va_end(ap);
            std::wcout.imbue(std::locale("chs"));
            std::wcout<<buf<<std::endl;
            }
            如果要返回值:
            #include <iostream>
            #include <string>
            std::wstring myformat(const char *fmt, )
            {
            va_list ap;
            va_start(ap, fmt);
            wchar_t buf[2048];
            vswprintf(buf,fmt,ap);
            va_end(ap);
            std::wstring str = std::wstring(buf);
            return str;
            }

            posted @ 2012-05-17 16:52 Stone xin 閱讀(611) | 評論 (0)編輯 收藏

            2012年4月9日

            Boost異步IO

                 摘要: Boost異步IO  閱讀全文

            posted @ 2012-04-09 17:59 Stone xin 閱讀(455) | 評論 (0)編輯 收藏

            久久精品一本到99热免费| 亚洲综合伊人久久综合| 国产精品永久久久久久久久久 | 伊人久久大香线蕉综合网站| 久久久久亚洲爆乳少妇无| 精品国产乱码久久久久久呢| 久久狠狠高潮亚洲精品| 久久综合九色欧美综合狠狠 | 亚洲精品久久久www| 亚洲精品白浆高清久久久久久| 久久国产一区二区| 亚洲精品无码专区久久久| 91亚洲国产成人久久精品| 久久精品国产欧美日韩99热| 狠狠色噜噜狠狠狠狠狠色综合久久| 日韩亚洲国产综合久久久| 国产高潮国产高潮久久久| 亚洲AV伊人久久青青草原| 久久精品视频网| 蜜臀久久99精品久久久久久小说 | 中文字幕亚洲综合久久菠萝蜜| 九九久久自然熟的香蕉图片| 午夜精品久久久久久久无码| 日本免费一区二区久久人人澡| 香蕉久久夜色精品升级完成| 久久受www免费人成_看片中文| 四虎国产精品免费久久5151| 国产午夜免费高清久久影院 | 亚洲色婷婷综合久久| 亚洲国产成人乱码精品女人久久久不卡 | 国产午夜福利精品久久| 久久婷婷激情综合色综合俺也去| 久久亚洲日韩看片无码| 久久一区二区三区99| 久久精品国产亚洲Aⅴ香蕉| 国产精品久久久久久福利漫画| 麻豆成人久久精品二区三区免费| 久久久久亚洲AV无码专区首JN| 久久久www免费人成精品| 久久精品免费一区二区| 日韩精品久久久肉伦网站|