#include <stdlib.h> #include <string.h> #include<iostream> using namespace std; class Coordinate { public: int x; int y; void printX() { cout << x << endl; } void printY() { cout << y << endl; } }; int main(void) { Coordinate coor; coor.x = 20; coor.y = 30; coor.printX; coor.printY; system("pause"); return 0; }
相关分类