struct example{
char a[20];
int b;
double c;
};
---------
example burning_tree = new * example[3];
burning_tree[0] {"tree",8,10.0}
그 저렇게 초기화 대충 한담에
cout 으로 출력하려고 하는데
tree[1] -> a; 이게 자꾸 구문오류라고 안먹히는 이유가 뭐죠
(tree + 1) -> a 는 먹히는뎀
struct example{
char a[20];
int b;
double c;
};
---------
example burning_tree = new * example[3];
burning_tree[0] {"tree",8,10.0}
그 저렇게 초기화 대충 한담에
cout 으로 출력하려고 하는데
tree[1] -> a; 이게 자꾸 구문오류라고 안먹히는 이유가 뭐죠
(tree + 1) -> a 는 먹히는뎀
tree[1].a
.
두 수식은 다른건디요
아 애초에 tree[] -> 이게 말이안되는거엿네
ㄳ
(&tree;[1]) -> a 이거 되려나
(&tree;[1]) -> a
세미콜론 왜자꾸드가;
ㅇㅇ 되네요