Code:
Board::Board(Shape size)
: myAircraftCarrier(Vector location(Object.RandInt(1, size.Length()), Object.RandInt(1, size.Width()), Shape size(4,1)),
myBattleship(Vector location(Object.RandInt(1, size.Length()), Object.RandInt(1, size.Width()), Shape size(3,2)),
myCruiser(Vector location(Object.RandInt(1, size.Length()), Object.RandInt(1, size.Width()), Shape size(3,1)),
mySubmarine(Vector location(Object.RandInt(1, size.Length()), Object.RandInt(1, size.Width()), Shape size(2,1)),
myDestroyer(Vector location(Object.RandInt(1, size.Length()), Object.RandInt(1, size.Width()), Shape size(1,1)),
mySize(size.Length(), size.Width())
{
}
What's wrong with this implementation? I'm creating the new vector object inside of the implementation, but I don't see the problem.
'c:\my documents\visual studio projects\battleship\board.cpp(15) : error C2275: 'Vector' : illegal use of this type as an expression'