class CWinApp { public:CWinApp* m_pcurrentWinApp;public:CWinApp::CWinApp(){m_pcurrentWinApp = this;cout

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 13:51:39

class CWinApp { public:CWinApp* m_pcurrentWinApp;public:CWinApp::CWinApp(){m_pcurrentWinApp = this;cout
class CWinApp { public:CWinApp* m_pcurrentWinApp;
public:
CWinApp::CWinApp()
{
m_pcurrentWinApp = this;
cout

class CWinApp { public:CWinApp* m_pcurrentWinApp;public:CWinApp::CWinApp(){m_pcurrentWinApp = this;cout
确实是怪怪的,如果只是指向this完全是脱裤子放屁,又是哪个无良的书里写的.
不过,如果是为了连接其他的对象,比如像链表那样,还是有用的,看以后怎么用了.可能只是初始化为this,然后可能会有方法把它指向别的对象.