Question: Need simple C++ code to count how many cells in a blob. See required output. 1. Counting Cells (20 pts) Consider a grid of cells

Need simple C++ code to count how many cells in a blob. See required output.
1. Counting Cells (20 pts) Consider a grid of cells in two dimensions, where each cell is considered empty or fi1led. Any number of cells that are connected constitutes a blob. Every cel can either be connected to 4 adjacent cells (vertically, horizontally) or to 8 adjacent cells (vertically, horizontally, diagonally). The goal of your program is to count the number of cells in a blob, given a starting cell. Input The input for this program is provided as command line arguments, as shown below: fnane> File name for the grid of cells M> Number of rows in the grid N> Number of colunns in the grid
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
