How would I even go about this? It couts the right values such 1 or 0. I want to know if I can "convert" the 1's and 0's to yes or no.
This is my code:
Not sure if the complete code was needed but I provided it anyways. Just to give an idea of what I am doing. I also saw that there was another post for the exact same answer. It wasn't helpful.
the short answer: no you cant. this isnt python. i dont think c++ actually knows what a string is (someone correct me if im wrong.) and it is only emulated with std::string and char *'s (traditionally).
the long answer: no but you can pretend you can, using the terenary operator (?:) which if you know how to do ifs in excel then you can do this. how it works: condition ? value_if_condition_is_true : value_if_false
for example: cout<< RaceCarStatus ? "yes" : "no"
=================================================
as to your code: why are you including iostream and ostream? ostream is included with iostream
also why do you have a getter and a setter in car when you make the member public anyways? it defeats the purpose of getters and setters
main should be return an int as is stated by the standard
you shouldnt get into habit of using system. system itself is a bad way to interface with the environment and there are better ways of pausing
This code is for a project I had to set up. I just include all headers because I don't want to get an error for not adding anything. Plus I was getting an error because I didn't include ostream. Okay you have a point about the car but we had to answer a question answering if we need to add getters/setters or not. So that's why its in there.