testprog.cpp
来自「C++编成数据结构与程序设计方法 D.S.Malk编著」· C++ 代码 · 共 35 行
CPP
35 行
#include <iostream>
#include "illustrate.h"
using namespace std;
int main()
{
illustrate illusObject1(3); //Line 1
illustrate illusObject2(5); //Line 2
illustrate::incrementY(); //Line 3
illustrate::count++; //Line 4
illusObject1.print(); //Line 5
illusObject2.print(); //Line 6
cout << "Line 7: ***Increment y using "
<< "illusObject1***" << endl; //Line 7
illusObject1.incrementY(); //Line 8
illusObject1.setX(8); //Line 9
illusObject1.print(); //Line 10
illusObject2.print(); //Line 11
cout << "Line 12: ***Increment y using "
<< "illusObject2***" << endl; //Line 12
illusObject2.incrementY(); //Line 13
illusObject2.setX(23); //Line 14
illusObject1.print(); //Line 15
illusObject2.print(); //Line 16
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?