Create N-Dimensional Vector with Preset Values in C++
A simple 2D vector can be initialized with preset values using fill constructor.
{% highlight cpp %}
int xdim = 5;
int ydim = 4;
vector > container(xdim, vector(ydim, "1"));
for(int x=0; x<xdim; x++)
{
for(int y=0; y<ydim; y++)
{
cout...
blog.mdminhazulhaque.io1 min read