【初心者歓迎】C/C++室 Ver.17【環境依存OK】
■ このスレッドは過去ログ倉庫に格納されています
0488aaa
2005/05/25(水) 09:27:05typedef struct foo{
int x;
} foo;
typedef struct bar{
foo *y;
} bar;
int main(void){
int i;
int x, y;
bar A;
A.y->x = 100;
printf("%d", A.y->x);
return 0;
}
#if 0
gcc test.c;./a.out
コンフィグオプション:
../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk
--host=i386-redhat-linux
スレッドモデル: posix
gcc バージョン 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
#endif
確保していないはずの領域に書きこめてしまうのはなぜですか?
■ このスレッドは過去ログ倉庫に格納されています