#include <iostream>
#include <fstream>
using namespace std;
// sets max row and colum size
const int MAXROW=22;
const int MAXCOL=72;
const int MAXLINESIZE =80;
// standered way of putting this
void cleararray( char ba[][MAXCOL]);
void cleararray(char ba[][MAXCOL])
{
for (int row=0; row<MAXROW; row++)
for (int col=0; col<MAXCOL; col++)
ba[row][col]=' ';
}
The assignment is to construct code that searches through the file and counts the number of blobs. It needs to search if there is any characters arround the current one. I need to write one more function called
void DestroyBlob(Blobarray,r,c) and in here i need to figure out if there is characters arroung the current one. There are 8 possible places (r ,c-1 )
(r ,c+1 ) (r+1, c)(r-1, c)(r+1, c+1)(r+1, c-1)(r-1, c-1)(r-1, c+1))
All the final output needs to be is the number of blobs.
Thank you