I just started C++ and I'm getting a bunch of errors and I don't know what they mean. I did some searching and found some similar stuff but nothing this simple.
So I fixed the original syntax errors but I'm still getting some
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
usingnamespace std;
class Car{
public:
void setMake(string a) {make = a;}
void sedModel(string o) {model = o;}
void setYear(unsigned y) {year = y;}
void setPrice(unsigned p) {price = p;}
string getMake() const; {return make;} //This line still has an error
string getModel() const; {return model;} //This line still has an error
unsigned getYear() const; {return year;} //This line still has an error
unsigned getPrice() const; {return price;} //This line still has an error
private:
string make;
string model;
unsigned year;
unsigned price;
};
Here's the errors that remain
1 2 3 4
31.cpp:9: error: expected unqualified-id before '{' token
31.cpp:10: error: expected unqualified-id before '{' token
31.cpp:11: error: expected unqualified-id before '{' token
31.cpp:12: error: expected unqualified-id before '{' token