3C++第三章.docVIP

  • 1
  • 0
  • 约2.11万字
  • 约 28页
  • 2016-12-01 发布于浙江
  • 举报
3C第三章

#include iostream using namespace std; class Point { private: double x; double y; public: double getx() { return x; } double gety() { return y; } void setx(double x); void sety(double y); }; void Point::setx(double xx) { x = xx; } void Point::sety(double yy) { y = yy; } int main() { double a; a = 1; Point p1, p2, p3; Point p[10]; p1.setx(0); p1.sety(0); coutp1.getx() p1.gety()endl; return 0; } #include iostream #include cstring using name

文档评论(0)

1亿VIP精品文档

相关文档