0
当我尝试在错误列表中添加结构在二维数组插入结构
cin>>array[1][items.stoka_ime];
这样写:
IntelliSense: no operator "[]" matches these operands
当我尝试在错误列表中添加结构在二维数组插入结构
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]);
这很好,但它是如何涉及到的问题? –
它可能的混合数组和结构以不正确的方式 –
好吧,但如何推队列中的对象? –