E
Eric Lilja
Hello, I have a function that has a static array with two elements in
it. When the function is called the first time, it should access
element 0, the second time it should access element 1, the third time
element 0, the fourth element 1 etc. I can do it by having a static
variable holding the index and and if/else-statement but is there a
more clever way that doesn't need the if/else?
it. When the function is called the first time, it should access
element 0, the second time it should access element 1, the third time
element 0, the fourth element 1 etc. I can do it by having a static
variable holding the index and and if/else-statement but is there a
more clever way that doesn't need the if/else?