fig09_08.cpp
来自「经典vc教程的例子程序」· C++ 代码 · 共 21 行
CPP
21 行
// Fig. 9.8: fig09_08.cpp
// Driver for class Point
#include <iostream.h>
#include "point2.h"
int main()
{
Point p( 72, 115 ); // instantiate Point object p
// protected data of Point inaccessible to main
cout << "X coordinate is " << p.getX()
<< "\nY coordinate is " << p.getY();
p.setPoint( 10, 10 );
cout << "\n\nThe new location of p is " << p << endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?