1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#include <iostream.h> struct point { int x; int y; }; void main() { point pt; pt.x = 5; pt.y = 5; cout << pt.x << endl; cout << pt.y << endl; } |
转载请注明:exchen's blog » C++ 结构体
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#include <iostream.h> struct point { int x; int y; }; void main() { point pt; pt.x = 5; pt.y = 5; cout << pt.x << endl; cout << pt.y << endl; } |
转载请注明:exchen's blog » C++ 结构体