To copy data from a webpage into an array of structs and sorted by"name" before producing the data. When i run this program it says press any key to continue?
<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;iomanip&gt;
#include &lt;fstream&gt;
using namespace std;

struct productJewelry
{
      string name;
      double amount;
      int itemCode;
      double size;
      string group;    
};


int main()
{
  // declare variables
  ifstream inFile;
      int count=0;
      int x=0;


      productJewelry product[50];

  inFile.open("jewelry.txt");  // file must be in same folder
if (inFile.fail())
 cout &lt;&lt; "failed";
  cout &lt;&lt; fixed &lt;&lt; showpoint;  // fixed format, two decimal places
  cout &lt;&lt; setprecision(2);



  while (inFile.peek() != EOF)
  {
//         cout &lt;&lt; count &lt;&lt; " : ";
         count++;
         inFile&gt;&gt; product[x].itemCode;
         inFile&gt;&gt; product[x].name;
         inFile&gt;&gt; product[x].size;
         inFile&gt;&gt; product[x].amount;
         inFile&gt;&gt; product[x].group;
//         cout &lt;&lt; product[x].itemCode &lt;&lt; ", " &lt;&lt; product[x].name &lt;&lt; ", "&lt;&lt; product[x].size &lt;&lt; ", " &lt;&lt; product[x].amount &lt;&lt; endl;
         x++;
         if (inFile.peek() == '\n')
           inFile.ignore(1, '\n');

  }

  inFile.close();
string temp;
bool swap;
       do
         {
           swap = false;
           for (int x=0; x&lt;count;x++)
           {
             if (product[x].name&gt;product[x+1].name)
             {
               //these 3 lines are to swap elements in array
               temp=product[x].name;
               product[x].name=product[x+1].name;
               product[x+1].name=temp;
               swap=true;
             }
           }
         } while (swap);


      for (x=0; x&lt; count; x++)
      {
         //cout&lt;&lt; product[x].itemCode&lt;&lt;" ";
         //cout&lt;&lt; product[x].name &lt;&lt;" ";
         //cout&lt;&lt; product[x].size &lt;&lt;" ";
         //cout&lt;&lt;  product[x].amount&lt;&lt;" ";
         //cout&lt;&lt;  product[x].group&lt;&lt;" "&lt;&lt;endl;

      }

  system("pause");  // to freeze Dev-c++ output screen
  return 0;
}   // end main
</code></pre>
