Background reading

Read sections 5.1-5.5 and 5.9 in chapter five.

The assignment

Do programming assignment 3 from chapter five.

Helpful hints

Read the pattern of black and white cells from a text file. To read a single character from a text file you can use this code:

char ch;
in >> ch;

To store the cells in a two dimensional grid use a vector of vectors of char:

vector<vector<char> > grid;

with this arrangement you can use the following syntax to determine whether the cell in row r and column c is white:

if(grid[r][c] == 'w')

Input data

Here is the input data you should use for your program

bbbbbbbbbb
bwbbwwbwwb
bbbbbwbwwb
bwwwbbwwwb
bwbwbwwbbb
bwbwwwbwbb
bwbbbbwwwb
bwbwbbwwwb
bwbwbbwwwb
bbbbbbbbbb