想使用C++标准链表,但是链表的每个结点有4个int类型的变量,问一下有什么方法
解决方案
5
每个节点都是一个struct
struct hello
{
int world1;
int world2;
int world3;
int world4;
};
struct hello
{
int world1;
int world2;
int world3;
int world4;
};
5
用结构体包装一下啊.

5
std::tuple<int,int,int,int> tp


40
#include<iostream>
#include<list>
using namespace std;
struct Time{
int t0;
int t1;
int t2;
int t3;
}
void main()
{
Time t1, t2;
std::list<Time> mylist;
mylist.push_back(t1);
mylist.push_back(t2);
}
5
感觉少一个分号