青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Impossible is nothing  
  愛過知情重醉過知酒濃   花開花謝終是空   緣份不停留像春風來又走   女人如花花似夢
公告
日歷
<2025年11月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
統(tǒng)計
  • 隨筆 - 8
  • 文章 - 91
  • 評論 - 16
  • 引用 - 0

導航

常用鏈接

留言簿(4)

隨筆分類(4)

隨筆檔案(8)

文章分類(77)

文章檔案(91)

相冊

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

 

1. c++中類的相互引用
 
  原則是:相互引用的class要分別寫.h和.cpp文件(分別合用一個.h,.cpp也可)
         在.h文件中只需申明class類型即可,一定不要包含其他類的頭文件
         在.cpp文件中必須要包含其他要引用的頭件
         不要將函數(shù)申明跟寒暑提在同一文件中實現(xiàn),否則會出意想不到的錯誤!!!
        
         a.h b.h 合成一個.h文件
         a.cpp b.cpp 合成一個.cpp文件也可
        
  a.h 
  #ifndef _A_
  #define _A_
  
  class b;
  class a;
  
  class a {
   friend class  b;
  private:
   int aa;  
   void a1( b m );
  };
  #endif
   a.cpp
        #include "stdafx.h"
  #include "a.h"
  #include "b.h"
  
  void a::a1(b m )
  { 
   m.bb = 0 ;
  }
   b.h
  #ifndef _B_
  #define _B_
  class  b;
  class a;
  
  class  b
  {
   friend class a;
  private:
   int bb;
   void zzz(a n);
  }; 
  #endif
 b.cpp
     #include "stdafx.h"
  #include "b.h"
  #include "a.h"
  void b::zzz(a m )
  { 
   m.aa = 0 ;
  } 
 
   main.cpp
  #include "stdafx.h"
  #include "a.h"
  #include "b.h"
  
  int main(int argc, char* argv[])
  {
  
      a aa;
      b bb;
  
      return 0;
  }

2. 鏈表的好用法
   struct a {
     static a *mLinkedList; // 申明為一個靜態(tài)變量
 
     a *mNext;
     bool mCanRemoteCreate;

    a(bool canRemoteCreate)
    {
       mNext = mLinkedList;
       mLinkedList = this;
       mCanRemoteCreate = canRemoteCreate;
    }
    static int *create(const char *name);
  };
 
  a *a::mLinkedList = NULL; // 初始化
 
3. 靈活的應用# ##
Token-Pasting Operator (##)

#define paster( n ) printf( "token" #n " = %d", token##n )
int token9 = 9;
If a macro is called with a numeric argument like
paster( 9 );the macro yields
printf( "token" "9" " = %d", token9 );which becomes
printf( "token9 = %d", token9 );

Stringizing Operator (#)
#define stringer( x ) printf( #x "\n" )
void main()
{
    stringer( In quotes in the printf function call\n );
    stringer( "In quotes when printed to the screen"\n );  
    stringer( "This: \"  prints an escaped double quote" );
}
Such invocations would be expanded during preprocessing, producing the following code:
void main()
{
   printf( "In quotes in the printf function call\n" "\n" );
   printf( "\"In quotes when printed to the screen\"\n" "\n" );
   printf( "\"This:
\\\" prints an escaped double quote\"" "\n" );
}
When the program is run, screen output for each line is as follows:In quotes in the printf function call
"In quotes when printed to the screen"
"This: \" prints an escaped double quotation mark"
#define IMPLEMENT_NETCONNECTION(className, classGroup, canRemoteCreate) \
   NetClassRep* className::getClassRep() const { return &className::dynClassRep; } \
   NetClassRepInstance<className> className::dynClassRep(#className, 0, NetClassTypeNone, 0); \
   NetClassGroup className::getNetClassGroup() const { return classGroup; } \
   static NetConnectionRep g##className##Rep(&className::dynClassRep, canRemoteCreate)

4. 枚舉:初始化為0值開始,后者比前者大1,除非顯式指定.
   By default, the first enumerator has a value of 0, and each successive enumerator is one larger
   than the value of the previous one, unless you explicitly specify a value for a particular
   enumerator. Enumerators needn’t have unique values. The name of each enumerator is treated
   as a constant and must be unique within the scope where the enum is defined. An enumerator
   can be promoted to an integer value. However, converting an integer to an enumerator requires
   an explicit cast, and the results are not defined.

=========================
一些優(yōu)秀的數(shù)學算法
5.1 /// Determines if number is a power of two.
 inline bool isPow2(const U32 number)
 {
    return (number & (number - 1)) == 0;
 }
5.2 浮點數(shù)的計算機中的儲存方法

    單精度      1|   8   |   23    |
             符號  指數(shù)      尾數(shù)
    雙精度      1|   11  |   52    |
             符號  指數(shù)      尾數(shù)  
            
    10110.100011 -> 1.0110100011* 2(4) 2的4之方
   
    符號位 0
    尾數(shù)   0110100011
    指數(shù)   4 以過剩127儲存 +127= 131  -> 10000011
    所以  IEEE 754 : 0100000110110100011
   
    -0.0010011  -> -1.0011 * 2(-3) 2的-3之方
    符號位:-1
    尾數(shù)  : 0011
    指數(shù)為:-3  +127  的124 -〉01111100
    所以: 1 01111100 0011000000000000000000
   
    /// Determines the binary logarithm of the input value rounded down to the nearest power of 2.
 inline U32 getBinLog2(U32 value)
 {
    F32 floatValue = F32(value);
    return (*((U32 *) &floatValue) >> 23) - 127;
 }

posted on 2006-03-03 15:30 笑笑生 閱讀(287) 評論(0)  編輯 收藏 引用 所屬分類: C++語言
 
Copyright © 笑笑生 Powered by: 博客園 模板提供:滬江博客
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            狂野欧美性猛交xxxx巴西| 免费黄网站欧美| 中日韩美女免费视频网站在线观看| 久久久亚洲国产美女国产盗摄| 激情成人在线视频| 欧美成人精品不卡视频在线观看| 久久久久成人精品| 亚洲日本欧美日韩高观看| 最新精品在线| 欧美午夜视频一区二区| 欧美一区国产二区| 久久久久久久久伊人| 亚洲人成高清| 中文欧美在线视频| 国产一区二区视频在线观看 | 韩国亚洲精品| 免费在线欧美黄色| 欧美三级不卡| 久久综合狠狠综合久久综青草 | 欧美色图天堂网| 性欧美办公室18xxxxhd| 久久青草久久| 亚洲在线成人| 免费不卡在线视频| 亚洲欧美一区二区三区久久| 久久爱www久久做| 99热免费精品在线观看| 亚洲男人的天堂在线| 亚洲风情亚aⅴ在线发布| 一本色道综合亚洲| 在线欧美小视频| 亚洲手机在线| 亚洲日本aⅴ片在线观看香蕉| 亚洲桃花岛网站| 亚洲黄色三级| 久久成人这里只有精品| 亚洲最黄网站| 久久性天堂网| 欧美亚洲一区| 欧美日韩卡一卡二| 欧美国产国产综合| 国产一区二区三区日韩欧美| 99天天综合性| 亚洲免费久久| 久久伊人精品天天| 久久精选视频| 国产精品久久久久久av福利软件| 亚洲二区在线视频| 好看不卡的中文字幕| 亚洲一级网站| 亚洲视屏一区| 欧美极品一区| 91久久国产综合久久| 亚洲福利国产精品| 久久久久www| 久久久91精品国产一区二区三区 | 欧美福利视频在线观看| 久久视频在线免费观看| 国产欧美精品一区| 亚洲影院免费观看| 午夜精品亚洲| 国产美女精品在线| 亚洲综合电影| 欧美在线观看www| 国产精品乱码一区二三区小蝌蚪| 夜夜狂射影院欧美极品| 在线亚洲免费| 欧美日韩一区二区高清| 一本色道久久综合狠狠躁的推荐| 一区二区毛片| 国产精品a级| 亚洲欧美日本国产专区一区| 亚洲午夜一级| 国产精品久久久久9999吃药| 亚洲一区二区四区| 欧美在线免费视屏| 国产综合色产在线精品| 久久国产日韩| 女同性一区二区三区人了人一| 亚洲福利国产| 欧美激情综合色综合啪啪| 亚洲精品综合精品自拍| 亚洲一区精品在线| 国产日韩欧美精品| 久久一二三四| 亚洲激情av在线| 亚洲尤物在线| 国产真实久久| 免费在线观看成人av| 一区二区日韩伦理片| 欧美一区二区三区在线看| 狠狠色丁香久久婷婷综合_中| 久久中文精品| 999亚洲国产精| 欧美一区=区| 亚洲国内自拍| 国产精品日日摸夜夜摸av| 久久av老司机精品网站导航| 欧美顶级少妇做爰| 亚洲综合社区| 亚洲春色另类小说| 欧美午夜www高清视频| 久久精品夜色噜噜亚洲a∨| 亚洲高清视频中文字幕| 午夜视黄欧洲亚洲| 91久久极品少妇xxxxⅹ软件| 国产精品大片wwwwww| 久久超碰97人人做人人爱| 亚洲精品乱码| 久久综合国产精品| 亚洲综合精品一区二区| 亚洲韩国精品一区| 国产精品狠色婷| 欧美成人精品在线播放| 午夜宅男久久久| 亚洲人成免费| 嫩草成人www欧美| 久久精品二区| 亚洲综合国产| 日韩视频精品| 亚洲高清三级视频| 国产免费观看久久黄| 欧美激情综合色综合啪啪| 久久久久久精| 欧美在线一二三区| 亚洲男人的天堂在线| 亚洲三级视频| 亚洲国产成人高清精品| 免费在线成人av| 久久精品亚洲精品| 欧美影视一区| 亚洲欧美另类在线| 亚洲少妇自拍| 亚洲视频在线一区观看| 日韩午夜视频在线观看| 亚洲人成网站精品片在线观看| 国内不卡一区二区三区| 国产欧美一区二区精品仙草咪| 欧美日韩中文字幕在线视频| 欧美精品一区二区三区四区| 欧美高清不卡| 欧美高清视频一区二区| 欧美大片免费久久精品三p| 男女激情久久| 欧美aaaaaaaa牛牛影院| 欧美成人午夜影院| 欧美成人精品一区| 欧美日韩91| 欧美性做爰猛烈叫床潮| 国产精品久久久久久久久婷婷 | 女仆av观看一区| 免费不卡亚洲欧美| 欧美精品福利视频| 欧美日韩国产精品专区| 欧美日韩亚洲一区| 国产精品老女人精品视频| 国产精品外国| 国产综合色产在线精品| 1024国产精品| 99综合在线| 午夜亚洲视频| 久久阴道视频| 亚洲欧洲日本mm| 亚洲一级一区| 久久久人人人| 欧美日本在线观看| 国产精品免费在线| 黄色精品网站| 亚洲精品国产欧美| 亚洲特级毛片| 久久夜色精品国产欧美乱| 欧美激情国产精品| 制服丝袜亚洲播放| 欧美在线首页| 欧美精品www在线观看| 国产精品蜜臀在线观看| 136国产福利精品导航网址应用| 亚洲黄页一区| 欧美一区二区三区四区高清| 美脚丝袜一区二区三区在线观看| 亚洲狼人综合| 久久国产色av| 国产精品高潮呻吟视频| 亚洲国产成人精品久久| 亚洲欧美美女| 亚洲国产精品va在看黑人| 亚洲欧美一区二区精品久久久| 久久综合九九| 国产精品视频精品| 91久久国产综合久久蜜月精品| 小黄鸭视频精品导航| 亚洲黄色影院| 久久激情五月丁香伊人| 欧美午夜激情视频| 亚洲国语精品自产拍在线观看| 欧美一区二区三区男人的天堂 | 牛人盗摄一区二区三区视频| 亚洲网在线观看| 欧美高清不卡在线| 精品成人一区|