ERROR WHICH I GOT
Multiple defintion of veh
Main.cpp
int main()
{
int choice;
char ans;
// string filen;
system ( "cls" ) ;
std::cout<<"ENTER FILE NAME with Extenstion:";
std::cin>>filen;
veh.at(i).vehcileLoad();
car.h
class vehicle
{
public:
vehicle();
virtual ~vehicle();
void addVehicle();
void deleteVehicle();
void printvehicle(vehicle v);
void show();
void showleft();
void vehcileLoad();
protected:
private:
std::string pltno;
date dt;
lime arrive;
lime departure;
};
std::vector<vehicle> veh(100);
std::vector<vehicle> vehleft(100);
std::fstream file;
std::string filen;
#endif // VEHICLE_H
Implementation FILE
The file contains all functions of the vehicle such as add vehcile etc A bit too long to include it but i did not redfine it there
What i Tried
I have tried using Extern
But it did not work I tried adding them to the implementation file and main file it did not work either
std::vector<vehicle> veh(100);
std::vector<vehicle> vehleft(100);
std::fstream file;
std::string filen;
These lines above are the ones which are getting the multiple definition of ... issue even though i only declared it in the header file how can i fix this issue please help me im stuck??