為了獲取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;
//這里同時也反映出++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;
}
摘要: 這些特效其實很簡單,主要是注意一些細(xì)節(jié)上的比如在設(shè)置視口(Viewport)的優(yōu)先級上不能有相同的
摘要: OIS的使用主要就是緩沖模式和非緩沖模式的運用,也就是我們在Windows編程中在While循環(huán)中使用鍵盤鼠標(biāo)消息處理和在窗口過程中處理是一樣的
摘要: 一篇講解makefile的文章收藏標(biāo) 題: 給大家一個好東西發(fā)信站: BBS 哈工大紫丁香站 (Fri Mar 3 21:32:25 2006)
好東西應(yīng)該大家來分享嘛!這是我迄今為止見過的最好的講解makefile的文章。希望有識之士能喜歡并收藏!
概述
——什么是makefile?或許很多Winodws的程序員都不知道這個東西,因為那些Windows的...