title: How can I make it so that users can add variables to a class and choose type in C++?
body: <p>I want to have a variable be determined by user-picked parameters and weights they choose as sort of a template, but C++ needs to know types at runtime, so what could I do?</p>
  <p>Let's say user wants to create a task template with the parameters a of type bool, b of type int, and c of type int with weights x, y, and z respectively.</p>
  <p>Im using Qt if its any help.</p>