I add an issue on reinterpreting a variable and I don\'t know why..
int ProgressBar(const uint64_t data_sent, const uint64
As Nick Strupat stated in comment,
reinterpret_cast can't cast away cv-qualifiers
So you can use reinterpret_cast and const_cast together.
reinterpret_cast
const_cast
Dialog *dialog = const_cast(reinterpret_cast(data));