title: C++ Scrolling Char Array
body: <p>In my program I'm trying to make a scrolling char array, I have the part that allows it to scroll but how can I make it where when it goes off the map, instead of going down a line, it resets. You might have to try out my code to see what I mean. Also, have can I make it where the outline box doesn't move? Here is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;windows.h&gt;
  using namespace std;
  
  char movingPicture[6][55];
  
  void text(int, int, int);
  
  int main()
  {
      int AxisX = 0;
      memcpy (movingPicture, picture, sizeof(picture));
      while(true)
      {
          for (int y = 0; y &lt; 6; y++) {
              for (int x = 0; x &lt; 55; x++) {
                  text(AxisX+x, 5+y, 15); cout &lt;&lt; movingPicture[y][x]; }
              }
              AxisX++;
              Sleep(50);
      }
  }
  </code></pre>