title: C++ text animation Error C2397
body: <p>I writted this code from a youtube video (from Husam Haj):
  <a href="https://www.youtube.com/watch?v=C2k-xiLmNSQ" rel="nofollow noreferrer">https://www.youtube.com/watch?v=C2k-xiLmNSQ</a></p>
  
  <p>This code is supposed to Animate Text (See the video) using C++, but the thing is that this code doesn't work since I got the following message from visual studio 2017:</p>
  
  <p><strong>"error C2397: conversion from 'int' to 'SHORT' requires a narrowing conversion"</strong></p>
  
  <p>I was researching in the internet and I found that someone already asked for help with this same code, but not solution:
  <a href="http://www.dreamincode.net/forums/topic/358635-i-need-some-help/" rel="nofollow noreferrer">http://www.dreamincode.net/forums/topic/358635-i-need-some-help/</a></p>
  
  <p>I would appreciate any help</p>
  
  <p>Below is the code:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;string&gt;
  #include &lt;string.h&gt;
  #include &lt;windows.h&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  void Display(string[], const int);
  
  int main()
  {
  const int arr_size = 12;
  string myInfo[arr_size] = { " Animated text example",
    "     Brooklyn College",
    "  Pre-Engineering Program",
   };
  
   Display(myInfo, arr_size);
  
   return 0;
  }
  
  void Display(string arr_string[], int arr_size)
  {
   HANDLE screen = GetStdHandle(STD_OUTPUT_HANDLE);
  
  COORD pos[18] = { { 0,6 },{ 0,7 },{ 0,9 },{ 0,11 },{ 0,13 },{ 0,15 },
   { 0,17 },{ 0,19 },{ 0,21 },{ 0,23 },{ 0,25 },{ 0,27 },
   { 0,29 },{ 0,31 },{ 0,33 },{ 0,35 },{ 0,37 },{ 0,39 } };
  
   for (int k = 0; k&lt;arr_size; k++)
  {
    for (int j = arr_string[k].size(); j &gt;= 0; j--)
  {
     for (int i = 0; i &lt;= j; i = i++)
  {
      SetConsoleCursorPosition(screen, pos[k]);
      cout &lt;&lt; " " &lt;&lt; endl;
      pos[k].X++;
  
      SetConsoleCursorPosition(screen, pos[k]);
      cout &lt;&lt; arr_string[k][j] &lt;&lt; endl;
      Sleep(1);
  }
  pos[k] = {0,k+1}; //HERE THE MISTAKE!
  }
  }
  }
  </code></pre>