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

            3D FPS

            1234567890

              C++博客 :: 首頁 :: 聯系 :: 聚合  :: 管理
              57 Posts :: 2 Stories :: 57 Comments :: 0 Trackbacks

            常用鏈接

            留言簿(10)

            我參與的團隊

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            #

            //2010/10/22 21:17:07 FRI

            //用c++程序編寫:
            //在九宮格里填寫數字,縱、橫、斜(對角)相加=15
            //create by jims


            #include < iostream>

            // +----+----+----+
            // |1   |2   | 3  |
            // +----+----+----+
            // |4   |5   |6   |
            // +----+----+----+
            // |7   |8   |9   |
            // +----+----+----+
            // ADS:use emacs table-insert

            bool check(int* a,int num)
            {

                //std::cout<<a[1]<<a[2]<<a[3]<<a[4]<<a[5]<<a[6]<<a[7]<<a[8]<<a[9]<<std::endl;
                if( (a[1]+ a[2] +a[3] ==15)
                    && (a[4] + a[5] + a[6] == 15)
                    && (a[7] + a[8] + a[9] == 15)
                    && (a[1] + a[4] + a[7] == 15)
                    && (a[2] + a[5] + a[8] == 15)
                    && (a[3] + a[6] + a[9] == 15)
                    && (a[1] + a[5] + a[9] == 15)
                    && (a[3] + a[5] + a[7] == 15)
                    )
                {
                    for( int i = 1; i <= 9; i++)
                    {
                        for( int j = 1; j <= 9; j++)
                        {
                            if( i != j
                             &&  a[i] == a[j])
                                return false;
                        }
                    }
                    return true;
                }
                else
                    return false;
            }

            int main(int argc, char* argv[])
            {
                int a[10];
                bool find = false;

                for( a[1] = 1; a[1] <= 9; a[1]++){
                for( a[2] = 1; a[2] <= 9; a[2]++){        
                for( a[3] = 1; a[3] <= 9; a[3]++){
                for( a[4] = 1; a[4] <= 9; a[4]++){        
                for( a[5] = 1; a[5] <= 9; a[5]++){
                for( a[6] = 1; a[6] <= 9; a[6]++){
                for( a[7] = 1; a[7] <= 9; a[7]++){        
                for( a[8] = 1; a[8] <= 9; a[8]++){
                for( a[9] = 1; a[9] <= 9; a[9]++){
                    if( check( a,9))
                    {
                        find = true;
                        std::cout<<a[1]<<a[2]<<a[3]<<a[4]<<a[5]<<a[6]<<a[7]<<a[8]<<a[9]<<std::endl;
                        goto leble_find;
                    }
                }}}}}}}}}

            leble_find:    
                if( find)
                {
                    std::cout<<a[1]<<" "<<a[2]<<" "<<a[3]<<"\n";
                    std::cout<<a[4]<<" "<<a[5]<<" "<<a[6]<<"\n";
                    std::cout<<a[7]<<" "<<a[8]<<" "<<a[9]<<"\n";
                }
                else
                    std::cout<<"can't find\n";

                std::cin.get();
                
            }


            posted @ 2010-10-22 22:39 DK_jims 閱讀(333) | 評論 (0)編輯 收藏


            ;;;C:\Documents and Settings\jims_mrs\Application Data

            1
             (load-file "D:/Program Files/emacs/HOME/.emacs")
            2 
            3 ;;; Emacs Load Path
            4 ;;(setq load-path (cons "D:/Program Files/emacs/HOME/.emacs" load-path))

            D:\Program Files\emacs\HOME
              1 
              2 (setenv "HOME" "D:/Program Files/emacs/HOME")
              3 (setenv "PATH" "D:/Program Files/emacs/HOME")
              4 ;;set the default file path
              5 (setq default-directory "~/")
              6 (add-to-list 'load-path "~/emacs/site-lisp")
              7 
              8 
              9 ;;(server-start)
             10 
             11 
             12 
             13 
             14 ;; 動態加載的代碼
             15 ;; M-x load-file,
             16 ;; M-x eval-buffer
             17 
             18 ;關閉啟動畫面
             19 (custom-set-variables
             20   ;; custom-set-variables was added by Custom.
             21   ;; If you edit it by hand, you could mess it up, so be careful.
             22   ;; Your init file should contain only one such instance.
             23   ;; If there is more than one, they won't work right.
             24  '(column-number-mode t)
             25  '(display-time-mode t)
             26  '(inhibit-startup-screen t)
             27  '(show-paren-mode t)
             28  '(truncate-partial-width-windows nil))
             29 
             30 ;;設置個人信息
             31 (setq user-full-name "mrx jimsmorong")
             32 (setq user-mail-address "jimsmorong@gmail.com"
             33 
             34 ;;加載顏色
             35 (require 'color-theme)
             36 ;;M-x color-theme-select
             37 ;;選擇哪一種顏色
             38 (color-theme-comidia)
             39 
             40 ;;加載lua mode
             41 (require 'lua-mode)
             42 
             43 ;;加載google_protobuf
             44 (require 'protobuf-mode)
             45 
             46 ;;加載CSope
             47 (require 'xcscope) ;;加載xcscope
             48 
             49 ;;加載yasnippet
             50 ;;(require 'yasnippet/yasnippet) ;; not yasnippet-bundle
             51 ;;(yas/initialize)
             52 ;;(yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets")
             53 
             54 ;;load browse-kill-ring
             55 (require 'browse-kill-ring)
             56 (global-set-key [(control c)(k)] 'browse-kill-ring)
             57 (browse-kill-ring-default-keybindings)
             58 
             59 ;;配置ido插件,這個可以使你在用C-x C-f打開文件的時候在后面有提示
             60 ;;----------------------------------------------------------------------------------------
             61 (require 'ido)
             62 (ido-mode t)
             63 ;;---------------------------------------------------------------------------------------- 
             64 
             65 
             66 
             67 
             68 ;;加載tabbar.el
             69 ;;------------------------------------------------------------------------------------------------------------------------------------------
             70 (require 'tabbar)
             71 (tabbar-mode t)
             72 (global-set-key [(control shift tab)] 'tabbar-backward)
             73 (global-set-key [(control tab)]       'tabbar-forward)
             74 ;;默認的分組方法并不是每個人都喜歡,它會把后綴名相同的文件分為一組,
             75 ;;比如說perl腳本都扔在一個組里,yaml文件又扔在另一個組里。寫代碼的時候,
             76 ;;在這兩個組里切換實在是太麻煩了!我就喜歡把除了Emacs Buffer之外的文件
             77 ;;都放成一組,即我自己打開的文件放成一組
             78 (setq tabbar-buffer-groups-function
             79     (lambda (b) (list "All Buffers")))
             80 (setq tabbar-buffer-list-function
             81     (lambda ()
             82         (remove-if
             83           (lambda(buffer)
             84              (find (aref (buffer-name buffer) 0" '"))
             85           (buffer-list))))
             86 
             87 ;;------------------------------------------------------------------------------------------------------------------------------------------
             88 
             89 ;;load line_number
             90 ;;(set-scroll-bar-mode nil)   ; no scroll bar, even in x-window system (recommended)
             91 ;;(require 'wb-line-number)
             92 ;;(wb-line-number-toggle)
             93 
             94 
             95 ;;顯示時間
             96 (display-time)
             97 
             98 ;;顯示行號
             99 (column-number-mode t)
            100 (show-paren-mode t)
            101 
            102 ;;去掉工具欄
            103 (tool-bar-mode nil)
            104 
            105 ;;去掉菜單欄
            106 ;;ctrl+鼠標右鍵 可以按出菜單
            107 ;;(menu-bar-mode nil)
            108 
            109 ;;去掉滾動條
            110 (set-scroll-bar-mode nil)
            111 
            112 ;;關閉煩人的出錯時的提示聲
            113 (setq visible-bell t)
            114 
            115 ;;滾動頁面時比較舒服,不要整頁的滾動
            116 (setq     scroll-step 1
            117 scroll-margin 3
            118 scroll-conservatively 10000)
            119 
            120 ;在標題欄顯示buffer的名字
            121 (setq frame-title-format "%b@emacs")
            122 
            123 ;;設置默認工作目錄
            124 (setq default-directory "D:/Program Files/emacs/mrx")
            125 ;;(setq default-directory "d:/mate2/dqprotocol")
            126 
            127 ; F5:激活speedbar
            128 (global-set-key [(f5)] 'speedbar-get-focus)
            129 
            130 ;;動態增加減少字體大小
            131 (defun sacha/increase-font-size ()
            132   (interactive)
            133   (set-face-attribute 'default
            134                       nil
            135                       :height
            136                       (ceiling (* 1.10
            137                                   (face-attribute 'default :height)))))
            138 (defun sacha/decrease-font-size ()
            139   (interactive)
            140   (set-face-attribute 'default
            141                       nil
            142                       :height
            143                       (floor (* 0.9
            144                                   (face-attribute 'default :height)))))
            145 (global-set-key (kbd "C-+"'sacha/increase-font-size)
            146 (global-set-key (kbd "C--"'sacha/decrease-font-size)
            147 
            148 
            149 
            150 (custom-set-faces
            151   ;; custom-set-faces was added by Custom.
            152   ;; If you edit it by hand, you could mess it up, so be careful.
            153   ;; Your init file should contain only one such instance.
            154   ;; If there is more than one, they won't work right.
            155  '(default ((t (:inherit nil :stipple nil :background "Black" :foreground "SteelBlue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight bold :height 90 :width normal :foundry "outline" :family #("微軟雅黑" 0 4 (charset chinese-gbk)))))))
            156 
            157 ;; read pdf
            158 ;;(load-file "~/dos/emacs/doc-view.el")
            159 ;;(require 'doc-view)
            160 
            161 
            162 
            163 
            164 
            165 
            166 ;;
            167 ;;(setq gnuwin32_bin "GetGnuWin32\gnuwin32\bin")
            168 (setq gnuwin32_bin "D:/Program Files/GetGnuWin32/gnuwin32/bin;")
            169 
            170 (setenv "PATH"
            171         (concat
            172           gnuwin32_bin 
            173           (getenv "PATH")
            174          )
            175         )
            176 
            177 
            178 (require 'doc-view)
            179 
            180 ;;配置linum插件,顯示行號
            181 ;;-----------------------------------------------------------------------------------
            182 (require 'linum)
            183 (global-linum-mode t)
            184 ;;----------------------------------------------------------------------------------- 
            185 
            186 
            187   (defun my-insert-date ()
            188     (interactive)
            189     (insert "//")
            190     (insert (user-full-name))
            191     (insert "@")
            192     (insert (format-time-string "%Y/%m/%d %H:%M:%S" (current-time))))
            193   (global-set-key (kbd "C-c m d"'my-insert-date)
            194 
            195 
            196 (require 'cmake-mode)


            將附件保存在D:\Program Files\emacs\ntemacs23\site-lisp

            http://www.shnenglu.com/Files/jimsmorong/site-lisp.zip




            posted @ 2010-05-10 21:46 DK_jims 閱讀(493) | 評論 (1)編輯 收藏

            visual studio 是一個十分優秀的IDE
            我在網上找了一些背景色是黑色的
            保護眼睛



            下載文件
             http://www.shnenglu.com/Files/jimsmorong/vs_black.rar

            另存為 解壓 6K 點那個reg 就OK

            posted @ 2010-04-07 21:51 DK_jims 閱讀(868) | 評論 (1)編輯 收藏

                 摘要: 24點 算法 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->  1 #include "stdafx.h"  2 #include <iostream>&n...  閱讀全文
            posted @ 2010-04-05 14:16 DK_jims 閱讀(234) | 評論 (0)編輯 收藏


            http://code.google.com/p/darkingim/
            玩玩開源

            代碼是自己寫的一些東西 的集合

            完成消息封裝
            network 層

            boost.asio + protobuf

            暫時未放上
            posted @ 2009-12-20 22:14 DK_jims 閱讀(95) | 評論 (0)編輯 收藏

            看lua 好似無我以前想的那么簡單

            然后再看看luatinker一個封裝庫

            再想想C

            覺得lua里也有C++的思想 起碼那個luaD luaK luaC 之類的前綴 給人感覺就像函數前的類名

            還有好多想不明白 
            posted @ 2009-04-30 06:30 DK_jims 閱讀(102) | 評論 (0)編輯 收藏

            轉自http://www.shnenglu.com/batiliu/archive/2008/11/26/67935.html






              非修改性序列操作(12個)

            循環 對序列中的每個元素執行某操作 for_each()

            查找 在序列中找出某個值的第一次出現的位置 find()

            在序列中找出符合某謂詞的第一個元素 find_if()

            在序列中找出一子序列的最后一次出現的位置 find_end()

            在序列中找出第一次出現指定值集中之值的位置 find_first_of()

            在序列中找出相鄰的一對值 adjacent_find()

            計數 在序列中統計某個值出現的次數 count()

            在序列中統計與某謂詞匹配的次數 count_if()

            比較 找出兩個序列相異的第一個元素 mismatch()

            兩個序列中的對應元素都相同時為真 equal()

            搜索 在序列中找出一子序列的第一次出現的位置 search()

            在序列中找出一值的連續n次出現的位置 search_n()

              修改性序列操作(27個)

            復制 從序列的第一個元素起進行復制 copy()

            從序列的最后一個元素起進行復制 copy_backward()

            交換 交換兩個元素 swap()

            交換指定范圍的元素 swap_ranges()

            交換由迭代器所指的兩個元素 iter_swap()

            變換 將某操作應用于指定范圍的每個元素 transform()

            替換 用一個給定值替換一些值 replace()

            替換滿足謂詞的一些元素 replace_if()

            復制序列時用一給定值替換元素 replace_copy()

            復制序列時替換滿足謂詞的元素 replace_copy_if()

            填充 用一給定值取代所有元素 fill()

            用一給定值取代前n個元素 fill_n()

            生成 用一操作的結果取代所有元素 generate()

            用一操作的結果取代前n個元素 generate_n()

            刪除 刪除具有給定值的元素 remove()

            刪除滿足謂詞的元素 remove_if()

            復制序列時刪除具有給定值的元素 remove_copy()

            復制序列時刪除滿足謂詞的元素 remove_copy_if()

            唯一 刪除相鄰的重復元素 unique()

            復制序列時刪除相鄰的重復元素 unique_copy()

            反轉 反轉元素的次序 reverse()

            復制序列時反轉元素的次序 reverse_copy()

            環移 循環移動元素 rotate()

            復制序列時循環移動元素 rotate_copy()

            隨機 采用均勻分布來隨機移動元素 random_shuffle()

            劃分 將滿足某謂詞的元素都放到前面 partition()

            將滿足某謂詞的元素都放到前面并維持原順序 stable_partition()

              序列排序及相關操作(27個)

            排序 以很好的平均效率排序 sort()

            排序,并維持相同元素的原有順序 stable_sort()

            將序列的前一部分排好序 partial_sort()

            復制的同時將序列的前一部分排好序 partial_sort_copy()

            n個元素 將第n各元素放到它的正確位置 nth_element()

            二分檢索 找到大于等于某值的第一次出現 lower_bound()

            找到大于某值的第一次出現 upper_bound()

            找到(在不破壞順序的前提下)可插入給定值的最大范圍 equal_range()

            在有序序列中確定給定元素是否存在 binary_search()

            歸并 歸并兩個有序序列 merge()

            歸并兩個接續的有序序列 inplace_merge()

            有序結構上的集合操作 一序列為另一序列的子序列時為真 includes()

            構造兩個集合的有序并集 set_union()

            構造兩個集合的有序交集 set_intersection()

            構造兩個集合的有序差集 set_difference()

            構造兩個集合的有序對稱差集(并-交) set_symmetric_difference()

            堆操作 向堆中加入元素 push_heap()

            從堆中彈出元素 pop_heap()

            從序列構造堆 make_heap()

            給堆排序 sort_heap()

            最大和最小 兩個值中較小的 min()

            兩個值中較大的 max()

            序列中的最小元素 min_element()

            序列中的最大元素 max_element()

            詞典比較 兩個序列按字典序的第一個在前 lexicographical_compare()

            排列生成器 按字典序的下一個排列 next_permutation()

            按字典序的前一個排列 prev_permutation()


            posted @ 2009-02-23 21:27 DK_jims 閱讀(317) | 評論 (0)編輯 收藏

            C++ 枚舉類型的思考(轉載)

            原文網址:  http://blog.csdn.net/classfactory/archive/2004/08/29/87749.aspx

            C++ 中的枚舉類型繼承于 C 語言。就像其他從 C 語言繼承過來的很多特性一樣,C++ 枚舉也有缺點,這其中最顯著的莫過于作用域問題——在枚舉類型中定義的常量,屬于定義枚舉的作用域,而不屬于這個枚舉類型。例如下面的示例:

            enum FileAccess {
                Read = 0x1,
                Write = 0x2,
            };

            FileAccess access = ::Read; // 正確
            FileAccess access = FileAccess::Read; // 錯誤

            C++枚舉的這個特點對于習慣面向對象和作用域概念的人來說是不可接受的。首先,FileAccess::Read 顯然更加符合程序員的直覺,因為上面的枚舉定義理應等價于如下的定義(實際上,.NET 中的枚舉類型便是如此實現的):

            class FileAccess {
                static const int Read = 0x1;
                static const int Write = 0x2;
            };

            其次,這導致我們無法在同一個作用域中定義兩個同樣名稱的枚舉值。也就是說,以下的代碼是編譯錯誤:

            enum FileAccess {
                Read = 0x1,
                Write = 0x2,
            };

            enum FileShare {
                Read = 0x1, // 重定義
                Write = 0x2, // 重定義
            };

            如果這一點沒有讓你惱怒過的話,你可能還沒寫過多少 C++ 代碼 :-)。實際上,在最新的 C++0x 標準草案中有關于枚舉作用域問題的提案,但最終的解決方案會是怎樣的就無法未卜先知了,畢竟對于象 C++ 這樣使用廣泛的語言來說,任何特性的增刪和修改都必須十分小心謹慎。

            當然,我們可以使用一些迂回的方法來解決這個問題(C++ 總是能給我們很多驚喜和意外)。例如,我們可以把枚舉值放在一個結構里,并使用運算符重載來逼近枚舉的特性:

            struct FileAccess {
                enum __Enum {
                    Read = 0x1,
                    Write = 0x2
                };
                __Enum _value; // 枚舉值

                FileAccess(int value = 0) : _value((__Enum)value) {}
                FileAccess& operator=(int value) {
                    this->_value = (__Enum)value;
                    return *this;
                }
                operator int() const {
                    return this->_value;
                }
            };

            我們現在可以按照希望的方式使用這個枚舉類型:

            FileAccess access = FileAccess::Read;

            并且,因為我們提供了到 int 類型的轉換運算符,因此在需要 int 的地方都可以使用它,例如 switch 語句:

            switch (access) {
                case FileAccess::Read:
                    break;
                case FileAccess::Write:
                    break;
            }

            當然我們不愿意每次都手工編寫這樣的結構。通過使用宏,我們可以很容易做到這一點:

            #define DECLARE_ENUM(E) \
            struct E \
            { \
            public: \
                E(int value = 0) : _value((__Enum)value) { \
                } \
                E& operator=(int value) { \
                    this->_value = (__Enum)value; \
                    return *this; \
                } \
                operator int() const { \
                    return this->_value; \
                } \
            \
                enum __Enum {

            #define END_ENUM() \
                }; \
            \
            private: \
                __Enum _value; \
            };

            我們現在可以按如下的方式定義前面的枚舉,并且不比直接寫 enum 復雜多少。

            DECLARE_ENUM(FileAccess)
                Read = 0x1,
                Write = 0x2,
            END_ENUM()

            DECLARE_ENUM(FileShare)
                Read = 0x1,
                Write = 0x2,
            END_ENUM()
            posted @ 2009-02-19 22:40 DK_jims 閱讀(320) | 評論 (0)編輯 收藏

            放些代碼上來 懶得打字:
            因為這個東西 有些很不爽

            #include <stdio.h>
            #include <vector>
            #include <algorithm>
            #include <functional>
            //#include "DKcommit.hpp"
            template<class T>
            struct printT
            {    // functor for operator>
                void operator()(const T& _t) const
                {   
                    printf("%d ",_t);
                    //return true;
                }
            };
            #define UseThisFile
            #ifdef UseThisFile

            #define iPageItemCount 15

            int PageConcontArray[iPageItemCount];

            void GiveSpecDateAtPage(std::vector<int> &vecAllDate, int ipage,int *pIntArray)
            {
                std::vector<int>::iterator it;
                 if (vecAllDate.size() == 0)
                 {
                       return ;
                 }
                if (vecAllDate.size() > (ipage + 1) * iPageItemCount )
                 {
                      for (it = vecAllDate.begin() + ipage * iPageItemCount ; it != vecAllDate.begin() + (ipage + 1) * iPageItemCount ;it++)
                      {
                             *pIntArray = *it;
                             pIntArray ++;
                      }
                 }
                 else if (vecAllDate.size() < (ipage +1 ) * iPageItemCount
                             && vecAllDate.size() > (ipage) * iPageItemCount )
                 {
                     for (it = vecAllDate.begin() + ipage * iPageItemCount ; it != vecAllDate.end() ;it++)
                     {
                         *pIntArray = *it;
                         pIntArray ++;
                     }
                 }
            }
            //iPageItemCount



            void GivedDescDateAtPage(std::vector<int> &vecAllDate, int ipage,int *pIntArray)
            {
                std::vector<int>::iterator it;
               

                //int iPageCount = vecAllDate.size() / iPageItemCount;
               
                if (vecAllDate.size() == 0)
                {
                    return ;
                }
                if (vecAllDate.size() > (ipage + 1) * iPageItemCount )
                {
                    for (it = vecAllDate.end() -1 - (ipage ) * iPageItemCount ; it != vecAllDate.end() - 1  - (ipage +1 ) * iPageItemCount ;it--)
                    {
                        *pIntArray = *it;
                        pIntArray ++;
                    }
                }
                else if (vecAllDate.size() <= (ipage +1 ) * iPageItemCount
                    && vecAllDate.size() > (ipage) * iPageItemCount )
                {
                    //int icount;
                    //for (icount = vecAllDate[vecAllDate.size() - vecAllDate.size() % iPageItemCount  - ipage * iPageItemCount] ; icount >= 0  ;icount--)
                    //%for (it = vecAllDate.begin(); it != vecAllDate.end() /* - 1*/- ipage * iPageItemCount  ;it++)
                    for ( it = vecAllDate.end()  - 1- ipage * iPageItemCount  ;it != vecAllDate.begin()  ;it--)
                    {
                        //*pIntArray = *(&vecAllDate[icount]);
                        *pIntArray = *it;
                        pIntArray ++;
                    }
                    *pIntArray =  *(&vecAllDate[0]);
                }
            }


            void main()
            {
                printf("helloWorld\n");

                std::vector<int> a;
                for (int i = 1; i < 11; i ++)
                {
                    a.push_back(i);
                }

                std::for_each(a.begin(),a.end(),printT<int>() );

                printf("\n");

                std::for_each(PageConcontArray,PageConcontArray+10,printT<int>());
                printf("\n");
               

                for (int iPage = 0 ;iPage <= 19;iPage ++)
                {
                    printf("This is %d page  :",iPage);
                    int a1 = ARRAY_SIZE(PageConcontArray);
                    int b2 = sizeof(PageConcontArray)/sizeof(PageConcontArray[0]);
              
                    for (int i = 0; i < iPageItemCount ;i++)
                    {
                        PageConcontArray[i] = 0;
                    }
               
                   //std::for_each(PageConcontArray,PageConcontArray+iPageItemCount,printT<int>());
                   GiveSpecDateAtPage(a,iPage,PageConcontArray);
                   std::for_each(PageConcontArray,PageConcontArray+iPageItemCount,printT<int>());
                   printf("\n");
                }


                for (int iPage = 0 ;iPage <= 19;iPage ++)
                {
                    printf("This is %d page  :",iPage);
                    int a1 = ARRAY_SIZE(PageConcontArray);
                    int b2 = sizeof(PageConcontArray)/sizeof(PageConcontArray[0]);

                    for (int i = 0; i < iPageItemCount ;i++)
                    {
                        //printf("FFF< %d > sdf",i);
                        PageConcontArray[i] = 0;
                    }


                    //std::for_each(PageConcontArray,PageConcontArray+iPageItemCount,printT<int>());
                    GivedDescDateAtPage(a,iPage,PageConcontArray);
                    std::for_each(PageConcontArray,PageConcontArray+iPageItemCount,printT<int>());
                    printf("\n");
                }




                //std::for_each(PageConcontArray,PageConcontArray+10,printT<int>());

                printf("\n");
                //printf("\n");


               

                getchar();
            }


            #endif




            posted @ 2009-02-08 03:17 DK_jims 閱讀(225) | 評論 (2)編輯 收藏

            C++ 文本讀寫


            C++文本讀寫保存 如果是中文 用wofstream 寬字保存 中文字

            竟然不可以

            原來 是要用一個local 本地環境才可以的

            代碼如下:

            #include "stdafx.h"
            #include <fstream>
            //#include <>
            int _tmain(int argc, _TCHAR* argv[])
            {
                std::locale::global(std::locale(""));

                wchar_t a[140]= L"中中";
                std::wifstream f;
                f.open(L"1.txt");
                //f.write(a,10);
                f.read(a,140);

               
                f.close();
                //getchar();
                return 0;
            }
            posted @ 2009-01-31 19:46 DK_jims 閱讀(382) | 評論 (1)編輯 收藏

            僅列出標題
            共6頁: 1 2 3 4 5 6 
            久久精品无码专区免费东京热 | 99精品久久久久久久婷婷| 久久妇女高潮几次MBA| 久久亚洲私人国产精品| 国产一区二区精品久久凹凸 | 久久婷婷五月综合97色一本一本| 久久精品国产亚洲AV忘忧草18| 久久综合给久久狠狠97色| 国内精品久久久久久久久电影网 | 91久久精品91久久性色| 久久精品二区| 国产精品对白刺激久久久| 色诱久久av| 精品无码久久久久久久动漫| 伊人久久无码中文字幕| 国产高清美女一级a毛片久久w| 狠狠色综合网站久久久久久久高清| 热99re久久国超精品首页| 久久精品日日躁夜夜躁欧美| 精品国产综合区久久久久久| 国产精品久久影院| 一本色道久久88—综合亚洲精品| 久久黄色视频| 精品久久人人做人人爽综合 | 久久精品无码一区二区三区日韩 | 久久国产精品波多野结衣AV| 国产91色综合久久免费| 久久精品国产亚洲AV不卡| 色欲综合久久躁天天躁| 久久久久亚洲AV成人网人人网站| 久久线看观看精品香蕉国产| 久久亚洲精精品中文字幕| 亚洲精品国产美女久久久| 久久亚洲国产精品成人AV秋霞| 欧美久久天天综合香蕉伊| 亚洲国产日韩欧美综合久久| 亚洲国产成人久久综合一区77| 国产精品免费久久| 久久精品国产清自在天天线| 欧美大战日韩91综合一区婷婷久久青草| 久久国产免费直播|