C++第三次作业static

c++的static static对于C++的数据共享有着非常重要的作用。 在类中申明的static数据是从属于类而不是对象,也就是说所有的对象都拥有共同该数据信息: #include<iostream> using namespace std; class Point { public: Point(int xx = 0, int yy = 0) { X = xx; Y = yy;
相关文章
相关标签/搜索