08/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);}