📄 cppconstructor.cpp
字号:
/********************************************************************
Copyright (c) Beijing Feitian Technologies
http://www.FTSafe.com
File : CppConstructor.cpp
Created: 2003/11/04
Author: yihai
Purpose: ?
Revision: ?
*********************************************************************/
// CppConstructor.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
class CMyClass
{
public:
CMyClass(int i);
void DoMyFunc();
~CMyClass();
int m_iData;
};
CMyClass::CMyClass(int i)
{
MessageBox(0,"constructor",0,0);
m_iData = i;
}
void CMyClass::DoMyFunc()
{
MessageBox(0,"MyFunc",0,0);
}
CMyClass::~CMyClass()
{
MessageBox(0,"destructor",0,0);
}
CMyClass g_myClass(0x1234);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
g_myClass.DoMyFunc();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -