【初心者歓迎】C/C++室 Ver.49【環境依存OK】
■ このスレッドは過去ログ倉庫に格納されています
0430421
2008/02/23(土) 22:28:56#include <string.h>
#include <stdio.h>
typedef struct { char *st; }strdata;
f(strdata *x){
delete x->st;
x->st = new char [9];
strcpy(x->st,"++++++"); }
main(){
char *ch=NULL;
strdata x;
x.st=ch;
f(&x);
printf("%s",ch);}
■ このスレッドは過去ログ倉庫に格納されています