im stuck and my program won't responed keep saying
" In function `int main(int, char**)': "
" no matching function for call to `Ship::Ship(const char[8], int)' "
" candidates are: Ship::Ship() "
The problem is exactly what the compiler error says it is: you're trying to create a Ship object using a constructor with two arguments, e.g. at line 30, but you haven't defined a constructor that takes those arguments. In fact, you haven't defined any constructors at all.
It's not really a good idea to put complicated stuff that could fail into a constructor. Really, a constructor should just do simple initialisation of the state of the class.
Oh, and just as with any other function definition, you don't put a semicolon at the end of the first line, like you did there.
In any case, that's a constructor that doesn't take any arguments - what we call a default constructor. However, what you're attempting to call at lines 30 and 32 is a constructor that takes arguments. The compiler can't magically write it for you - you'll have to define it.
yah i knw i kinda did that out of habit with the semicolon. thats what im trying to do the default constructor . like the ship defualt is enterprise adn the fuel is 0. im trying to figure out but nothing, hoping it might work.
Well, for the default constructor, you don't need to have those cout and cin lines. Just set ShipName and fuel to appropriate defaults.
Once you've got your default constructor working, then write one that takes the arguments you're trying to pass in on lines 30 and 32, and set the data members to the values of those arguments.