Search:

Type: Posts; User: Salem

Search: Search took 0.23 seconds.

  1. Replies
    10
    Views
    1,889

    Look at this ships[i].x_coord = ships[i].x_coord...

    Look at this
    ships[i].x_coord = ships[i].x_coord + rand() % 100;

    Now look at this
    if (spaceShip ships[i] > highestValue)

    It seems you copied the whole type and variable name from the...
  2. Replies
    10
    Views
    1,889

    spaceShip createShips (spaceShip ships[], int...

    spaceShip createShips (spaceShip ships[], int size)
    {
    for (int i = 0; i < size; i++)
    {
    ships[i].x_coord = rand() % 1024;
    ships[i].y_coord = rand() % 768;
    }
    //...
Results 1 to 2 of 2