It's supposed to generate binary numbers like this :
00 01 10 11 000 001 010 011 ....
And count how many times they appear in sir[].
At the end of function Suma, I have the binary sequence in v[] and the number in nr.
I'm using indice to copy them into secv[][] (the binary sequence) and *apar (how many times it appears in sir[]).
However, indice resets every time I call Memorare().
Is there any other way to do this?
Edit:
Removed the code.
I managed to fix it on my own, thanks to everyone who's trying to help!