im making an iterative program that uses an algorithm to update the elements of a matrix. I made the program in procedural/functional form before, but now i am learning classes and re-doing the whole thing. Here is the crux of my problem.
if (F[x][y]== 0){F[x][y]=1;}
else F[x][y]=do_something();
}
}
}
this is not the algorithm just an example, in the real algorithm there would be many if's, do_something()'s, etc. I do intend the algorithm to stay inside this member.
previously do_something() would return a value to change F[x][y] for a standard functional program, but this is no longer possible within the member function(even if i can i dont want to). I am not sure what my options are, so if anyone could point me in the right direction i would appreciate it.