In the following code, the compiler complains as: struct std::array<double,5ul> has no member named 'assign'
. Here, it seems possible. Why is it so? (Compiler: g++ 4.8.2)
#include <array>
int main()
{
std::array<double,5> arr;
arr.assign(4.); // error: has no member named 'assign'
return 0;
}
That is very simple, as you can see here there is no assign member function for an std array. There is however a member function called fill
you should be able to use.