C言語なら俺に聞け(入門篇) Part 34 at TECH
[2ch|▼Menu]
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