- 68 名前:デフォルトの名無しさん (JP 0H2e-TKAZ) [2017/04/07(金) 15:08:17.29 ID:4pSi19lZH.net]
- static int a[]; // prototype
static int a[] = {1,2,3,4}; int getitem(int n) { return a[n]; } このコード、 gcc -Wall -c -o hoge.o hoge.c だったら何のエラーも警告も出ないけど、 g++ -Wall -c -o hoge.o hoge.c だとaのサイズがわからん、とエラーになるんですが、 c++だとどう書けばいいんですか?
|

|