标签:point char 结构 turn public bsp 指针 get style
//结构与指针 struct MyPoint { int x, y; }; //类与指针 class CMyButton { int x, y; char isType; public: void setButtonDown(char it); char getButtonDown()const { return isType; } }; void CMyButton::setButtonDown(char it) { isType = it; } void main() { MyPoint *pt; MyPoint pos = { 1, 2 }; pt = &pos; pt->x = 10; pt->y = 20; CMyButton mb; CMyButton*pmb; pmb = &mb; pmb->setButtonDown(‘T‘); pmb->getButtonDown(); }
标签:point char 结构 turn public bsp 指针 get style
原文地址:http://www.cnblogs.com/ming-michelle/p/7618038.html