title: Why this Code Work in "Visual Studio 2017" BUT Dose NOT work in "Visual Studio 6.0"
body: <p>This Code Work 100% in <strong>Visual Studio 2017</strong> But I Don't know why Does 
      not Work in <strong>VS 6.0</strong>  </p>
  
  <p><a href="https://i.stack.imgur.com/rVKux.jpg" rel="nofollow noreferrer">The Result in Visual Studio 6.0</a></p>
  
  <p><a href="https://i.stack.imgur.com/qLtk6.jpg" rel="nofollow noreferrer"> The Result in Visual Studio 2017</a></p>
  
  <pre><code>    #include&lt;iostream&gt;
      #include&lt;assert.h&gt;
      using namespace std;
  
      class stack
      {
          struct Node
          {
              int info;
              Node *link;
          };
          Node *Top;
          int count;
          int *list1, *list2;
          int i, x;
      public:
          stack()
          {
              Top = NULL;
              count = 0;
              list1 = new int[count];
              list2 = new int[count];
          }
          bool isEmpty() { return Top == NULL; }
  
          int TopStack()
          {
              assert(Top != NULL);
              return Top-&gt;info;
          }
  
          void Push(int num)
          {
              Node *newNode = new Node;
              newNode-&gt;info = num;
              newNode-&gt;link = Top;
              Top = newNode;
              count++;
          }
          void Pop()
          {
              Node *temp;
              if (!isEmpty())
              {
                  temp = Top;
                  Top = Top-&gt;link;
                  delete temp;
                  count--;
              }
              else
                  cout &lt;&lt; "the Stack is Empty." &lt;&lt; endl;
          }
          void Input()
          {
              int num, Stop;
              cout &lt;&lt; "Enter the stop Value : ";
              cin &gt;&gt; Stop;
              cout &lt;&lt; "Enter the number : ";
              cin &gt;&gt; num;
              while (num != Stop)
              {
                  Push(num);
                  cin &gt;&gt; num;
              }
          }
          void print()
          {
              stack temp;
              cout &lt;&lt; "\n The Number is : ";
              while (!isEmpty())
              {
                  temp.Push(TopStack());
                  Pop();
              }
  
              while (!temp.isEmpty())
              {
                  cout &lt;&lt; temp.TopStack() &lt;&lt; " ";
                  Push(temp.TopStack());
                  temp.Pop();
              }
          }
  
          void Palindrom()
          {
              stack temp1;
              bool found = false;
  
              while (!isEmpty())
              {
                  list1[i] = TopStack();
                  temp1.Push(list1[i]);
                  Pop();
                  i++;
              }
              while (!temp1.isEmpty())
              {
                  list2[x] = temp1.TopStack();
                  Push(temp1.TopStack());
                  temp1.Pop();
                  x++;
              }
              cout &lt;&lt; "\n\nThe list 1 : ";
              for (int t = 0; t &lt; count; t++)
                  cout &lt;&lt; list1[t] &lt;&lt; " ";
              cout &lt;&lt; "\nThe list 2 : ";
              for (int r = 0; r &lt; count; r++)
                  cout &lt;&lt; list2[r] &lt;&lt; " ";
  
              for (int e = 0; e &lt; count; e++)
              {
                  if (list1[e] != list2[e])
                  {
                      found = true;
                      break;
                  }
              }
              cout &lt;&lt; endl &lt;&lt; endl;
              if (found)
              {
                  cout &lt;&lt; "   -Not Palindrom" &lt;&lt; endl;
              }
              else
                  cout &lt;&lt; "   -Palindrom " &lt;&lt; endl;
  
          }
      };
  
  
      int main()
      {
          stack obj;
          obj.Input();
          obj.print();
          obj.Palindrom();
          return  0 ;
      }
  </code></pre>
  
  <p>If there is another way easier let me know.</p>