y‰SŽÒнŒ}zC/C++Ž ..
479:ƒfƒtƒHƒ‹ƒg‚Ì–¼–³‚µ‚³‚ñ
08/02/24 00:07:28
>>477
‚¶‚á‚ ‚à‚¤‚¢‚¢‚©‚çA‚±‚¤‚µ‚Æ‚¯
#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");@}@
void@g(bin@*x)@{
delete[]@*x->start;@
*x->start@=@new@char@[3];@
strcpy(*x->start,"bb");@}@
main()@{@
char@*ch@=@NULL;@
bin@x;@
x.start=&ch;@
f(&x);@
printf("%s",ch);
g(&x);@
printf("%s",ch);
}
‚±‚ê‚ÅI—¹A‚à‚¤—ˆ‚é‚È
ŽŸƒy[ƒWÅVƒŒƒX•\ަƒXƒŒƒbƒh‚ÌŒŸõ—ÞŽ—ƒXƒŒˆê——˜b‘è‚̃jƒ…[ƒX‚¨‚Ü‚©‚¹ƒŠƒXƒg¥ƒIƒvƒVƒ‡ƒ“‚ð•\ަ‰É‚‚Ԃµ2ch
4987“ú‘O‚ÉXV/243 KB
’S“–:undef