[Solved] ERROR:Missing type specifier [closed]


In your setMake function it’s declared as a string but returns no value. I believe you forgot to return the passed value.

//************
// setMake
//************
string Car::setMake(string carMake)
{

    make = carMake;
    return make; // This line should do the trick

}

I do suggest next time taking a closer look at what the compiler outputs, since it likely gave you a line number and even the name of the function where the issue was.

Side note: Generally set functions are declared as void since they usually don’t need to return anything.

1

solved ERROR:Missing type specifier [closed]