•//***************************************************************
•//
Election program
•//
This program reads votes represented by precinct number and
•//
ballot position from a data file, calculates the sums per
•// precinct and per candidate, and writes all totals to an
•// output file
•//***************************************************************
•#include …
•
•using namespace std;
•
•const int NUM_PRECINCTS = 4;
•const int NUM_CANDIDATES = 4;
•
•typedef int VoteArray[NUM_PRECINCTS][NUM_CANDIDATES];
• // 2-dimensional
array type
• // for votes
•