Why does converting from a size_t to an unsigned int give me a warning?
Posted
by Marlon
on Stack Overflow
See other posts from Stack Overflow
or by Marlon
Published on 2010-04-03T02:35:33Z
Indexed on
2010/04/03
2:43 UTC
Read the original article
Hit count: 400
I have the code:
unsigned int length = strlen(somestring);
I'm compiling with the warning level on 4, and it's telling me that "conversion from 'size_t' to 'unsigned int', possible loss of data" when a size_t is a typedef for an unsigned int.
Why!?
© Stack Overflow or respective owner