개요
- C++ 구조체
#include <iostream>
using namespace std;
typedef struct {
int x;
int y;
} Point;
int main() {
Point p = {3, 4};
cout << p.x << endl; // 3
cout << p.y << endl; // 4
}
#include <iostream>
using namespace std;
typedef struct {
int x;
int y;
} Point;
int main() {
Point p = {3, 4};
cout << p.x << endl; // 3
cout << p.y << endl; // 4
}