trgbishi 2015-02-08 08:54 采纳率: 0%
浏览 1604

类似于pt.x wndclass.style 的是什么?新手求

{
WNDCLASS wndclass;
.....
wndclass.style=***;
}

class point
{
int x;
int y;
void output()
{
.....
}
};

void main()
{
point pt;
pt.x=0;
pt.y=0;
pt.output();
}
这样的类于A.B的形式,以上两例有什么区别?还有其他什么地方用到?
希望弄清楚,谢谢

  • 写回答

1条回答 默认 最新

  • threenewbee 2015-02-08 12:46
    关注

    API里面定义的是结构体,不是类,结构体在C语言中可以支持,class只有C++支持。
    定义方式类似
    typedef 结构体名
    {
    成员,
    ...
    } ...;
    你可以在msdn或者windows.h中看到这些定义,比如
    https://msdn.microsoft.com/en-us/library/ms633576.aspx

    评论

报告相同问题?