C++/0x07-stl14 using the delete operator using the delete operator 1.source #include #include using namespace std; char * getName(void); int main( int argc , char ** argv ) { char *name; name = getName(); cout 2016. 7. 29. 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. new new 1.소스 #include using namespace std; int main( int argc , char ** argv ) { int * pt = new int; *pt = 200; cout 2016. 7. 28. vector 값 복사 vector 값 복사 1.소스 2016. 7. 12. 이전 1 2 3 4 다음