Without context, your code is meaningless, we have no way to know what is going on because it depend on other piece of code that we don't know.
When you post a piece of code, it is a good idea to post an autonomous piece of code (code that we can compile and run)(this include the data).
-----
Learn to indent properly your code, it show its structure and it helps reading and understanding. It also helps spotting structures mistakes.
for (i = 1; i <= n; i++){
if (i == pow(2, p)){
Final[i] = 0;
p++;
}
else{
Final[i] = b[j];
j++;
}
}
for (i = 1; i < pow(2, r); i = pow(2, x)){
for (j = 1; j <= n; j++){
if ((i&j) == i)
Final[i] ^= Final[j];
}
x++;
std::cout << std::endl << i <<" " <<Final[i] ;
}
Professional programmer's editors have this feature and others ones such as parenthesis matching and syntax highlighting.
Notepad++ Home[
^]
ultraedit[
^]