I’m relatively new to this level of coding and am really hitting my wall on this error:
[Line 65] error C2143: syntax error : missing ';' before '.'
Obviously this would usually mean a syntax error in my code, but I can’t find it flippin anywhere. Any assistance (or a second set of eyes to see my error would be appreciated).
Here is the code snippet in question:
class RacingCar {
public:
Wheel* wheels[4];
RacingCar()
{
wheels[0] = new Wheel;
wheels[1] = new Wheel;
wheels[2] = new Wheel;
wheels[3] = new Wheel;
}
RacingCar( RacingCar& refOldCar)
{
// new Wheel(refOldCar.wheels[0]->pressure);
wheels[0] = new Wheel;
wheels[1] = new Wheel;
wheels[2] = new Wheel;
wheels[3] = new Wheel;
int a = refOldCar.speedCopy();
**RacingCar.setSpeed(10);**
RacingCar.Brake(50);
RacingCar.Print();
RacingCar.speed = refOldCar.speed;
}
Thanks a ton for any help
This:
should be:
which is shorthand for: