Help with Structures

This is a discussion on Help with Structures within the C++ Programming forums, part of the General Programming Boards category; **Cue usual spiel about being a noob and new to programming**
Here is the problem: Create an array of space ...

Help with Structures

**Cue usual spiel about being a noob and new to programming**

Here is the problem: Create an array of space ship objects and write a program that continually updates their positions until they all go off the screen. Assume that the size of the screen is 1024 pixels by 768pixels.

Build errors are at the bottom of the code...

I'm sure this is something obvious but I cannot figure out what I need to do here... Any hints or help would be appreciated.

sorry I am new to this and am not quite sure why I need to have a result output in that function... and if I do need one then what should it be? I tried making it a void and it didnt really change anything program still doesn't compile.

Elysia, actually I know how to return values but honestly have no idea what you mean by return types...(**edit :this must have something to do with why I had to change the spaceShip lowestValue to int lowestValue because the return was an int and spaceShip isn't an int? and they have to match?) You were right Salem, voids were better since the values weren't really being used elsewhere, I did have an error left with spaceShip findHighest, apparently I can't do that since I have it return highestValue which is an int and spaceShip is a non-scalar? Didn't know that one but I changed it to the below function and it now compiles fine and works... Also figured out what I really wanted was the lowest value not the highest so I fixed that as well, now it does exactly what I wanted... Sorry for my stupidity guys and thanks for bearing with me as I am still very much a beginner...

honestly have no idea what you mean by return types...(**edit :this must have something to do with why I had to change the spaceShip lowestValue to int lowestValue because the return was an int and spaceShip isn't an int? and they have to match?)

If you don't know what a function return type is, you should probably review the following links: Functions I and Functions II.