- 477 名前:デフォルトの名無しさん [2008/02/24(日) 00:03:07 ]
- >>475
>>471ではdeleteやnewが効かない場合があるんです これはちゃんと表示されますか? #include <stdio.h> #include <string.h> typedef struct { char *start ; char *end; } bin; void f(bin *x) { delete x->start; x->start = new char [3]; strcpy(x->start,"aa"); } main() { char *ch = NULL; bin x; x.start=ch; f(&x); printf("%s",ch);}
|

|