testprog.cpp

来自「data+structures+using+c的源码」· C++ 代码 · 共 18 行

CPP
18
字号
#include <iostream>
#include "classExample.h"

using namespace std;

int main()
{
	classExample *cExpPtr;		//Line 1
	classExample cExpObject;	//Line 2

	cExpPtr = &cExpObject;		//Line 3

	cExpPtr->setX(5);			//Line 4
	cExpPtr->print();			//Line 5

	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?