2 dimension arrays
How is a character e.g, 'ch' in a two-dimensional array found?
for instance: how will you find a chararcter ch ( also the position 'where' it is found)? afile is a pre-opened file.
int findC(char ch, fstream & afile, int & where)
Sounds like homework. Here is a couple of suggestions:
If you want to find a char inside a two dimensional array, you will have to scan the array element by element using, for instance, nested for loops. When you find the char you can save its location in two integers (for the two dimensions of the array).
If you want to find a char inside an open file, you will have to scan the file char by char, keeping a counter and comparing what you got from the file, and when you got a match saving the counter into a single integer.
thanx for your help, but can u please give some examples because your answer is still not quite clear to me.