convert uint32_t to int

how can I do this?
kuntilanakAsked:
Who is Participating?
 
jkrCommented:
By casting - you can either use a C-style cast like

uint32_t u =42;
int i = (int) u;

or a C++-style cast

uint32_t u =42;
int i = static_cast<int>(u);
0
 
jkrCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.