title: What's the best way of implementing a finite state machine in C++
body: <p>I've seen a number of different approaches to implementing a FSM. </p>
  
  <p>Switch-case
  Function pointer tables
  object oriented programming</p>
  
  <p>My question is what are the main factors I should be aware of when choosing one implementation over the other. In my case I only have 4 states with at most 2 transitions at each state. My main goal is for the implementation to be easily readable for someone else to modify.</p>
  
  <p>Thanks</p>