F
fff_afafaf
Do you know is it possible to put different kinds of tuples to one
container?
E.g. to a vector?
(The lengths of the tuples are different, and also the types in the
tuples are different..
-> Is it possible to make a pointer, which can point to all of these
tuples?)
#include <tr1/tuple>
#include <iostream>
#include <string>
using std::tr1::tuple; using std::tr1::get;
using std::cout;
int main()
{
// Just any kinds of tuples:
tuple<int,int> t0(1, 2);
tuple<int,int, int> t1(1, 2, 3);
tuple<int,long> t2(1, 2);
tuple<int,std::string> t3(1, "2str");
tuple<int,std::string, int> t4(1, "2string", 3);
tuple<int,int> t5(1, 2);
// -> Is it possible to store those e.g. to a vector?
return 0;
}
container?
E.g. to a vector?
(The lengths of the tuples are different, and also the types in the
tuples are different..
-> Is it possible to make a pointer, which can point to all of these
tuples?)
#include <tr1/tuple>
#include <iostream>
#include <string>
using std::tr1::tuple; using std::tr1::get;
using std::cout;
int main()
{
// Just any kinds of tuples:
tuple<int,int> t0(1, 2);
tuple<int,int, int> t1(1, 2, 3);
tuple<int,long> t2(1, 2);
tuple<int,std::string> t3(1, "2str");
tuple<int,std::string, int> t4(1, "2string", 3);
tuple<int,int> t5(1, 2);
// -> Is it possible to store those e.g. to a vector?
return 0;
}