using new with a structure1 using new with a structure using new with a structure 1.소스 #include #include using namespace std; struct inflatable { char name[20]; int count; }; int main( int argc , char ** argv ) { string sname = "black falcon"; inflatable *ps = new inflatable; strcpy(ps->name , sname.c_str() ); ps->count = 1; cout 2016. 7. 29. 이전 1 다음