?? h8.h
字號:
#ifndef h8_h_#define h8_h_#include<iostream>#include<cmath>using namespace std;class Vector{private: double x; //坐標x,y double y; double direction; //方向 double length; //大小public: Vector(double x_ = 0,double y_ = 0); Vector(const Vector& temp); ~Vector(); void set_length(); //獲得長度 void set_dirextion(); //獲得方向 Vector operator+(const Vector& temp)const; //重載函數 Vector operator-(const Vector& temp)const; Vector operator*(const Vector& temp)const; Vector& operator=(const Vector& temp); Vector& operator--(); Vector& operator++(); Vector operator++(int); Vector operator--(int); friend double operator*(double i,Vector& temp); friend ostream& operator<<(ostream& out,Vector& temp); };#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -