Array not filling up

I have made a function which takes a 1D array input and has to rearrange it. It is basically an array of cards and all the discarded cards are changed to OO. In this function, in the first for loop, I try to store the indexes of all the non-zero cards (which can be 26 in number max) and store them in an array called indexc. In the second for loop, I'm trying to rearrange the array using these indexes. However, when I cout indexc (just to check whether it works fine), the array doesn't fill up properly and its elements remain 0. I can't seem to figure out the problem. Can somebody help me with this, please?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
int RearrangeComp(string rearrcomp[26])
{
	int counterc = 0;
	int indexc[26] = {};
	int temp1 = 0;
	int o = 0;
	
			for (int m = 0; m < 26; ++m)
			{
				
				if(rearrcomp[m] != "00")
				{
					++counterc;
					indexc[o] = {m};
					++o;
				}
			}


			for (int m = 0; m < 26; ++m)
			{
				
			}
			for (int m = 0; m < 25; ++m)
			{
				temp1 = indexc[m];
				if (indexc[m] != 0)
				{
					rearrcomp[m] = rearrcomp[temp1];			
				}
			}
Topic archived. No new replies allowed.