Tag: function pointers switch

Replace switch statement by function pointers

//———————————————————————————— // 1.2 Introductory Example or How to Replace a Switch-Statement // Task: Perform one of the four basic arithmetic operations specified by the // characters ‘+’, ‘-‘, ‘*’ or ‘/’. // The four arithmetic operations … one of these functions is selected // at runtime with a switch or a function pointer float Plus

Continue Reading →