為了獲取Class的private成員的數(shù)據(jù)---int* flag = (int*)(ctest);
#include<iostream>
class CTest
{
private:
int m_y;
public:
CTest(int value){m_y = value;}
~CTest(){}
void
getValue(){std::cout<<"m_y is:
"<<m_y<<std::endl;}
};
void getClassValue(CTest* ctest)
{
//for(int* flag =
(int*)(ctest);*flag!=NULL;flag++)
int* flag = (int*)(ctest);
std::cout<<*flag<<std::endl;
//flag++;
std::cout<<*(++flag)<<std::endl;
//這里同時(shí)也反映出++i和i++的區(qū)別
std::cout<<*flag<<std::endl;
}
int _tmain(int argc, _TCHAR* argv[])
{
CTest* test=new CTest(2);
test->getValue();
getClassValue(test);
delete test;
system("pause");
return 0;
}
摘要: 這些特效其實(shí)很簡(jiǎn)單,主要是注意一些細(xì)節(jié)上的比如在設(shè)置視口(Viewport)的優(yōu)先級(jí)上不能有相同的
摘要: OIS的使用主要就是緩沖模式和非緩沖模式的運(yùn)用,也就是我們?cè)赪indows編程中在While循環(huán)中使用鍵盤(pán)鼠標(biāo)消息處理和在窗口過(guò)程中處理是一樣的
稍候貼上我的總結(jié)報(bào)告和Source code,同時(shí)Ogre也是含狀態(tài)機(jī)原理,在處理動(dòng)作狀態(tài)時(shí)會(huì)帶來(lái)一些麻煩。
摘要: 一篇講解makefile的文章收藏標(biāo) 題: 給大家一個(gè)好東西發(fā)信站: BBS 哈工大紫丁香站 (Fri Mar 3 21:32:25 2006)
好東西應(yīng)該大家來(lái)分享嘛!這是我迄今為止見(jiàn)過(guò)的最好的講解makefile的文章。希望有識(shí)之士能喜歡并收藏!
概述
——什么是makefile?或許很多Winodws的程序員都不知道這個(gè)東西,因?yàn)槟切¦indows的...
摘要: 無(wú)意中在硬盤(pán)中發(fā)現(xiàn),很久以前畫(huà)的攝像頭與計(jì)算機(jī)數(shù)據(jù)通信時(shí)的一個(gè)管道通信模塊的流程圖