title: Can't convert from int to vector
body: <p>Previously I've asked a question and got a small answer but now I'm taken to a point in which I'm unable to compile this code successfully. I'm attempting to build a shop type database, for now I can do with simply using an array of strings. But I've been recommended that using an array of strings is bad practise to use in C++ and isn't a good idea to continue with. So for future reference I'd like to this done so I may be later tackle on vectors in my exam.</p>
  
  <pre><code> #include "string"
   #include "vector"
   #include "iostream"
   using namespace std;
   class shop
   {
      private:
           int i, n, item[20];
           float price[20];
           std::vector&lt;std::string&gt; name;
       public:
           void input();
           void output();
   };
   void shop::input()
   {
       cout &lt;&lt; "Enter the number of items: ";
       cin &gt;&gt; n;
       name.clear();
       name.push_back(n);
       name.resize(n);
       for(i = 1; i &lt;= n; i++)
       {
           cout &lt;&lt; "Enter the item number of the " &lt;&lt; i &lt;&lt; " item: ";
           cin &gt;&gt; item[i];
           cout &lt;&lt; "Enter the name of the item: ";
           cin &gt;&gt; name[i];
           cout &lt;&lt; "Enter the price of the item: ";
           cin &gt;&gt; price[i];
       }
   }
   void shop::output()
   {
       for(i = 1; i &lt;= n; i++)
       {
           cout &lt;&lt; "Item Number: " &lt;&lt; item[i] &lt;&lt; endl;
           cout &lt;&lt; "Price: " &lt;&lt; price[i] &lt;&lt; endl &lt;&lt; endl;
           cout &lt;&lt; "Name: " &lt;&lt; name[i] &lt;&lt; endl &lt;&lt; endl;
       }
   }
   void main()
   {
       class shop s;
       s.input();
       s.output();
   }
  </code></pre>
  
  <p>But the error I get is:</p>
  
  <pre><code>1&gt;------ Build started: Project: Project1, Configuration: Debug Win32 ------
  1&gt;  Source.cpp
  1&gt;c:\users\khale_000\documents\visual studio 2013\projects\project1\project1\source.cpp(20): error C2664: 'void std::vector&lt;std::string,std::allocator&lt;_Ty&gt;&gt;::push_back(const std::basic_string&lt;char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt; &amp;)' : cannot convert argument 1 from 'int' to 'std::basic_string&lt;char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt; &amp;&amp;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Ty=std::string
  1&gt;          ]
  1&gt;          Reason: cannot convert from 'int' to 'std::basic_string&lt;char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt;'
  1&gt;          No constructor could take the source type, or constructor overload resolution was ambiguous
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>