c++ change type of variable code example Example: how to change the type of something in c++ static_cast<the type you want> (variable)