📄 const.cpp
字号:
// const.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include "Point.h"
using namespace std;
int main(int argc, char* argv[])
{
Point pt(3,4);
cout<<pt.cal_dist(Point(10,12))<<endl;
pt.set_x(6);
cout<<pt.get_x()<<endl;
cout<<pt.cal_dist(Point(10,12))<<endl;
Point const pt_const(1,10);
//pt_const.set_x(6);
cout<<Point::center.x<<endl;
cout<<Point::center.y<<endl;
cout<<Point::center.get_x()<<endl;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -