Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
二次元配列に構造体を追加しようとすると
cin>>array[1][items.stoka_ime];
エラーリストにこれを書きます:
IntelliSense: no operator "[]" matches these operands
あなたの質問から、あなたの実際の問題が何であるかは明確ではありません。そのため、配列と構造体を組み合わせた使用例を示すだけです。
構造体配列の場合
struct abc { int i; int j; } abc object[10]; cin>>object[0].i>>object[0].j;
構造体の配列
struct abc { int i[10]; } abc object; cin>>object.i[0];
構造体のキュー配列にプッシュする場合:
queue.push(array[i]);