2- Fire the Bug - C++

 Welcome! This is the second post of the Find and Resolve the Bug Series.


The code with the comments;

// define a Car class to store informations about a car
class Car {
        int mileage;
        int year;
        int horsepower;
        string make;
        string model;
}
// create an object from Car class
Car myCar;
// set a new value for mileage
myCar.mileage = 10000;
// print out the mileage of the car object we created recently
cout<<myCar.mileage<<endl;


What could fix the issue in the code above?

Comments