Point position in a vector/array
<p>I'm writing a C++ code that uses elements inside a vector / array. What I am doing is basically outside my main code I create a vector:</p>

<pre><code>     const int Lx = 4, Ly = 4;
     const int L = Lx*Ly;

     inline void vector_lattice(){

         for (int i = 0; i &lt; L+1; i++){
             s[i]=0.0;
         }

         for (int i = 0; i &lt; L; i++){
             s[i] =1;
         }

    }
</code></pre>

<p>Lx and Ly will give me dimensions, since eventually I'll turn it into a 5x5 array.</p>

<p>In my problem this will give me a set of positions in "space", which should have an output that looks like</p>

<pre><code>     .   .   .   .   .
     .   .   .   .   .
     .   .   .   .   .
     .   .   .   .   .
     .   .   .   .   .
</code></pre>

<p>However I now need something like </p>

<pre><code>     .   .   .   .   .
       .   .   .   .   .
     .   .   .   .   .
       .   .   .   .   .
     .   .   .   .   .
</code></pre>

<p>Or be flexible to change those positions, but I don't really know how to do that since i can only be an integer and therefor my positions and spacemen's will be always the same. Does any one have any ideas on how that could be done?</p>