0
我有下面的代碼,我想打印數組中的每個元素。C++打印數組列表的元素
struct pckt
{
float gen_time;
int node_id;
bool last;
int seq;
float end_time;
}
list<pckt> nodelist[51];
pckt newpckt;
newpckt.gen_time = inp;
newpckt.node_id = i;
newpckt.last = false;
newpckt.seq = 1;
newpckt.end_time = 1.0;
nodelist[i].push_back(newpckt);
// I wnat to print each element in array list.
你嘗試過什麼? – Jon