Hi i'm relatively new to arduino, and above beginner at programing.
I saw that you can store functions in an array, visited some other forums and saw that this is (I think) how you should do it.
Yet im having a problem.
C++ doesn't allow copying arrays with simple assignment so your initialization of stateTimes in setup() will not do what you expect. It is probably saving the address of the newly created array in the first element off the end of your array!
Either initialize in the declaration or assign each element separately in setup().
[quote author=Coding Badly date=1493486296 link=msg=3240845]
Including the ampersand is redundant. But it causes no problems.
It makes your (the programmer's) intent crystal clear to the future you and anyone else who is saddled with maintaining your code.
In other words, there is no valid reason to exclude the ampersand and one valid reason to include it.[/quote]
This is great to know! Thank you! My understanding of the use of ampersand was clouded because I assumed that the ampersand would always shift to the memory location of the item even when it's a pointer. But what you are saying is that if it is already defined as a pointer nothing changes. Am I correct?