jeudi 6 avril 2017

Constructor initialization list: Expected primary-token before error

class Car {
 int id;
 myString make;
 myString model;
 int year;
 int cost;
 myDate date; 
 myString picture;
public:

Car():id(0),make(),model(),year(0),date(), cost(0), picture()
{ //Default Constructor }

Car(int ID, myString Make, myString Model, int Year, myDate d, int Cost, myString Picture)
    :id(ID), make(Make), model(Model), year(Year), date(d), cost(Cost), Picture(picture)
     {

     } 
};

The code gives a series of errors which says Primary token expected before (screenshot provided)

Can someone tell how to get of these errors? Thanks!

Aucun commentaire:

Enregistrer un commentaire