From 6884a80079292a5475de0abb64652a4c79e886ae Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Tue, 24 Jun 2014 20:59:40 +0000 Subject: Added population printout to map print --- games.c | 18 +++++++++++++----- location.h | 27 ++++++++++++++------------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/games.c b/games.c index e92f441..cca5cce 100644 --- a/games.c +++ b/games.c @@ -29,7 +29,7 @@ static void print_map_with_pops(void) us_pop+=world[i].population; } /* now sort into US and USSR cities */ - struct location_t us_cities[sizeof(world)/sizeof(struct location_t)], ussr_cities[sizeof(world)/sizeof(struct location_t)]; + struct location_t us_cities[sizeof(world)/sizeof(struct location_t)+1], ussr_cities[sizeof(world)/sizeof(struct location_t)+1]; int us_back=0, ussr_back=0; for(int i=0;i