The thing stored in a Standard Library container must be assignable and copyable – arrays are neither. Your best bet is to create a list of std::vector. Alternatively, you can wrap the array in a struct:
struct A {
int array[2];
};
std::list <A> alist;
More Related Contents:
- Is std::vector so much slower than plain arrays?
- How to initialize std::vector from C-style array?
- char* vs std::string in c++ [closed]
- Can std::begin work with array parameters and if so, how?
- what is the best modern c++ approach to construct and manipulate a 2d array [closed]
- array vs vector vs list
- Converting between C++ std::vector and C array without copying
- C++ STL: Array vs Vector: Raw element accessing performance
- How to cheaply assign C-style array to std::vector?
- Compiler Crash with C++ Array
- How do I use arrays in C++?
- What is the easiest way to initialize a std::vector with hardcoded elements?
- Initializing a static std::map in C++
- Array index out of bound behavior
- std::vector versus std::array in C++
- I don’t want my Excel Add-In to return an array (instead I need a UDF to change other cells)
- Determine the size of a C++ array programmatically?
- Arrays vs Vectors: Introductory Similarities and Differences [closed]
- Returning arrays from a function in c++
- Why can’t we pass arrays to function by value?
- How to implode a vector of strings into a string (the elegant way)
- How to update an existing element of std::set?
- What is the purpose of allocating a specific amount of memory for arrays in C++?
- Search a vector of objects by object attribute
- How do you dynamically allocate a matrix?
- Why is the STL so heavily based on templates instead of inheritance?
- How to sort an STL vector?
- How can I make the map::find operation case insensitive?
- what does `using std::swap` inside the body of a class method implementation mean?
- how do arrays work internally in c/c++