###前提・実現したいこと
構造体の中の配列を初期化したいです
###発生している問題・エラーメッセージ
c
1error C2078: 初期化子の数が多すぎます。 2
###該当のソースコード
c++
1//////Matrix.h 2 typedef struct 3{ 4 int index[3][3]; 5}Matrix3×3; 6 7//////Matorix.cpp 8#include "Matrix.h" 9using namespace std; 10int main() 11{ 12{Matrix3×3 a = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } }; 13 return 0; 14}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/24 01:35