title: How to display "Loading..." with having 3 dots animating using C++?
body: <p>You may have seen in many places <strong>&quot;Loading...</strong>&quot; where the 3 dots(or more), viz. &quot;...&quot;, first appear one by one, then after displaying all the dots, they disapperar and once again appear one by one (so, total 2 times).</p>
  <p>To elaborate:-</p>
  <p>Stage 1:</p>
  <blockquote>
  <p>Loading.</p>
  </blockquote>
  <p>Stage 2:</p>
  <blockquote>
  <p>Loading..</p>
  </blockquote>
  <p>Stage 3:</p>
  <blockquote>
  <p>Loading...</p>
  <p>Then, it repeats second time! and then terminate!</p>
  </blockquote>
  <p>So, for this I prepared a C++ program and its source code is:</p>
  <pre><code>#include &lt;iostream.h&gt;
  #include &lt;time.h&gt;
  #include&lt;dos.h&gt;
  int main()
  {
      cout &lt;&lt; &quot;Loading&quot;;
      cout.flush();
      for (;;) {
          for (int i = 0; i &lt; 3; i++) {
              cout &lt;&lt; &quot;.&quot;;
              cout.flush();
              sleep(1);
          }
          cout &lt;&lt; &quot;\b\b\b   \b\b\b&quot;;
      }
  
      return 0;
  }
  </code></pre>
  <p>This program is not terminating. It doesn't stops! How can I edit this to make this terminate?</p>
  <p>Please post codes supported by <strong>Turbo C++ Compiler</strong>, as I am not too much aware of the ANSI C++!! :P</p>
  <p>Gguys, please help me out? :)</p>
  <p>Thanks, in advance! :)</p>