C言語なら俺に聞け(入門篇) Part 34
at TECH
138:デフォルトの名無しさん
08/08/14 14:09:51
>>136
--
% cat foo.c
typedef struct{
double a;
char *mozi;
}HOGE;
HOGE data[200] = {0};
% gcc -c -Wall foo.c
foo.c:9: warning: missing braces around initializer
foo.c:9: warning: (near initialization for `data[0]')
% sed -e 's/{0}/{{0}}/' foo.c > fooz.c
% !g:s/foo/fooz
gcc -c -Wall fooz.c
% gcc --version
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
警告でなくなるけど。
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5380日前に更新/113 KB
担当:undef