I keep getting an undefined reference to `Vehicles::Vehicles()' whenever i use Vehicles to declare an object in my main program
also i cant seem to figure out how to initialize my array of classes.
Now that you've learned about classes, you've decided to expand the Vehicle struct from lab2 into a complete class. For now, you've decided to just store the following attributes of a vehicle: price, year and model. Write a computer program in C++ that stores Vehicles in an array and that can add, remove, print and list cars. The commands for adding, removing, printing and listing will come from a file specified on the command-line (Note: STDIN will NOT be used for this lab). Commands are as follows (fields are separated by tabs):
A <price> <year> <model> Add a new Vehicle.
R <price> <year> <model> Remove the specified Vehicle.
P <price> <year> <model> Print the specified Vehicle.
L List all of the Vehicles currently in the database.
#include <iostream>
usingnamespace std;
//class for my array data
class Vehicles
{
public:
void print();
bool compare(string inmodel, int inprice, int inyear);
int getYear();
void setYear(int in);
int getPrice();
void setPrice(int in);
string getModel();
void setModel(string in);
void remove(string a, int b, int c);
Vehicles();
// non default constructor
// Vehicles(char act, string mod, int pri, int yr);
private:
char actionNeeded;
string model;
int price;
int year;
};