struct 포인터
·
C++/Basic
#include #include using namespace std; struct ant { int year; }; int main() { ant s1, s2, s3; s1.year = 1; s2.year = 2; s3.year = 3; ant *ps[3] = { &s1, &s2, &s3 }; ant **pss = ps;//포인터와 배열이라서 ** cout year year = 2; cout