title: Vector printing incorrect data
body: <p>Can someone tell my why my program prints wrong values?
  I've mostly followed an youtube video how to use vectors. And the program which was written, i was able to run it. I tried to implement the same method for my program which is for cars (video was for students). But i'm having problems. Funny part is, that the student program ran well, i don't remember changing anything to it, and now it also doesn't print anything at all.  </p>
  
  <p>So i'm trying to make a program that inputs car brand, year and price into a vector of a class and then print out all the stored information. But i'm currently getting mixed results. 
  I'm either getting blank spaces for results or some huge numbers and blank space for the brand (string)</p>
  
  <p>When i'm not using references &amp; i get blank results, with &amp; i get what i've written below.</p>
  
  <p>Does anyone have an idea?</p>
  
  <p>When i input:
  brand - Lambo
  year - 1997
  price 25000</p>
  
  <p>I get:
  Car brand: 
  Car year: 2686588
  Car price: 6.95144e-308</p>
  
  <hr>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include "Car.h"
  #include &lt;vector&gt;
  
  
  using namespace std;
  
  Car::Car(){
  
  }
  Car::Car(string brand, int year, double price){
  brand;
  year;
  price;
  }
  Car::~Car(){
  
  }
  string Car::getBrand() const{
  return brand;
  }
  int Car::getYear() const{
  return year;
  }
  double Car::getPrice()const{
  return price;
  }
  
  void Car::setBrand(string brand){
  brand;
  }
  void Car::setYear(int year){
  year;
  }
  void Car::setPrice(double price){
  price;
  }
  
  
  
  
  void enterData(vector&lt;Car&gt;&amp;);
  void showData(const vector&lt;Car&gt;&amp;);
  
  int main(){
  
  vector&lt;Car&gt; myGarage;
  int chc;
  
  cout &lt;&lt; "-- M A I N  M E N U --\n\n";
  do{
      cout &lt;&lt; "Please make a choice\n\n";
      cout &lt;&lt; "1. Enter car details" &lt;&lt; endl;
      cout &lt;&lt; "2. Show car details" &lt;&lt; endl;
      cout &lt;&lt; "3. Exit" &lt;&lt; endl;
  
      cin &gt;&gt; chc;
      switch(chc){
          case 1:
              enterData(myGarage);
          break;
          case 2:
              showData(myGarage);
          break;
          case 3:
              cout &lt;&lt; "Have a nice day!";
          break;
      }
  
  }
  while(chc != 3);
  
  }
  
  void enterData(vector&lt;Car&gt;&amp; newMyGarage){
  string brand;
  int year;
  double price;
  
  cout &lt;&lt; "How many cars are in your garage?";
  int garageSize;
  cin &gt;&gt; garageSize;
  
  for(int i = 0; i &lt; garageSize; i++){
      cout &lt;&lt; "Car brand: ";
      cin &gt;&gt; brand;
      cout &lt;&lt; "Car year: ";
      cin &gt;&gt; year;
      cout &lt;&lt; "Car price: ";
      cin &gt;&gt; price;
  
      Car newCar(brand, year, price);
      newMyGarage.push_back(newCar);
      cout &lt;&lt; endl;
  }
  
  
  
  }
  void showData(const vector&lt;Car&gt;&amp; newMyGarage){
    unsigned int size = newMyGarage.size();
     for(unsigned int s = 0; s &lt; size; s++){
          cout &lt;&lt; "Car brand: " &lt;&lt; newMyGarage[s].getBrand() &lt;&lt; endl;
          cout &lt;&lt; "Car year: " &lt;&lt; newMyGarage[s].getYear() &lt;&lt; endl;
          cout &lt;&lt; "Car price: " &lt;&lt; newMyGarage[s].getPrice() &lt;&lt; endl;
          cout &lt;&lt; endl;
         }
  
  }
  </code></pre>
  
  <p>header file Car.h</p>
  
  <pre><code>#ifndef CAR_H_INCLUDED
  #define CAR_H_INCLUDED
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  class Car{
  public:
      string brand;
      int year;
      double price;
      Car();
      Car(string, int, double);
      ~Car();
      string getBrand() const;
      int getYear() const;
      double getPrice() const;
      void setBrand(string);
      void setYear(int);
      void setPrice(double);
  
  
  };
  #endif // CAR_H_INCLUDED
  </code></pre>