How to make it work for both int and double
Hello Please refer below structure of code. spinBox is used as class and its object has been created everywhere in entire code base in actual. How to make it work for double also? I mean I could think of having a constructor spinBox(double) and it should not be a problem. Main worry is for get and set functionality. I can define set for double as both set will be overloading function case. While get will be a problem as int get() and double get() is ambiguous. How to handle this scenario? Any thoughts? Unfortunately, I cannot share entire code base, but would like to definitely answer the query and try to mimic the answer in sample code. In short, How to handle spinbox class for both int and double? https://sololearn.com/compiler-playground/c21dSD9kVFjv/?ref=app