- 344 名前:デフォルトの名無しさん (ワッチョイ e2d4-cGUq) mailto:sage [2017/02/09(木) 15:54:11.28 ID:Ccc/L2ZJ0.net]
- VC++ なんですが typedef 絡み(スコープ?)で質問です。
typedef int macaddress_t[6]; void show(macaddress_t m) {} int test() { macaddress_t m; show(m); } なのですが、 error: 'macaddress_t' was not declared in this scope となってコンパイル通りません。 void show 〜の部分を extern "C" { void show(macaddress_t m) {} } って括ると大丈夫になります。 これは何が起きているのでしょうか。
|

|