C++ question

|R M R|
|R M M R|
|R M RR|
|R R|
|RRRRR |
| |
| MMMM |

Hello I have one problem I need to count how many letters which are side by side are in the matrix (I have done this part) andnow I need to change their letter to "x", how i need to do that? Thanks! :)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
bool Eiti(Kubai & kok, Kubai & Kubeliai, int i, int j, string letter, int p, int & count){
        int tt = 0; // kaimyno numeris
        bool yra = false;
        int max = 0;
                if(kok.ImtiReiksme(i,j).ImtiSiena(5) == letter){
                kok.DetiSP(i, j, p, "-");
                count++;
                        while(!yra && tt < 4){ // !yra = true
                                 i = i + kok.ImtiEil(tt);
                                 j = j + kok.ImtiStu(tt++);
                                if(kok.ImtiReiksme(i, j).ImtiSiena(p) == letter){
                                        Eiti(kok, Kubeliai, i, j, collor, p, count);
                                }
                        }
                }
        return yra;
}
Topic archived. No new replies allowed.