Click here to Skip to main content
15,908,437 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: convert from size_t to unsigned int Pin
George_George27-Jul-07 21:28
George_George27-Jul-07 21:28 
GeneralRe: convert from size_t to unsigned int Pin
Eytukan27-Jul-07 22:53
Eytukan27-Jul-07 22:53 
GeneralRe: convert from size_t to unsigned int Pin
George_George27-Jul-07 23:19
George_George27-Jul-07 23:19 
GeneralRe: convert from size_t to unsigned int Pin
Don Box27-Jul-07 23:29
Don Box27-Jul-07 23:29 
GeneralRe: convert from size_t to unsigned int Pin
George_George27-Jul-07 23:54
George_George27-Jul-07 23:54 
AnswerRe: convert from size_t to unsigned int Pin
John R. Shaw28-Jul-07 0:05
John R. Shaw28-Jul-07 0:05 
GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 0:12
George_George28-Jul-07 0:12 
GeneralRe: convert from size_t to unsigned int Pin
John R. Shaw28-Jul-07 0:37
John R. Shaw28-Jul-07 0:37 
You had me worried there for a moment – I thought I did not make it clear. No conversion is needed, the warning says you are converting it to an ‘int’ which will result in possible data loss – if and only if the value exceeds 2,147,483,647 (corrected for 32-bit integer).

The warning is not saying that you have a possible loss of data when converting to ‘unsigned int’, it says you are converting it too ‘int’, which is why the warning is occurring.


INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 1:25
George_George28-Jul-07 1:25 
GeneralRe: convert from size_t to unsigned int Pin
Eytukan28-Jul-07 3:27
Eytukan28-Jul-07 3:27 
GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 3:36
George_George28-Jul-07 3:36 
GeneralRe: convert from size_t to unsigned int Pin
Eytukan28-Jul-07 4:05
Eytukan28-Jul-07 4:05 
GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 19:28
George_George28-Jul-07 19:28 
AnswerRe: convert from size_t to unsigned int Pin
Roger Broomfield28-Jul-07 3:03
Roger Broomfield28-Jul-07 3:03 
GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 3:27
George_George28-Jul-07 3:27 
GeneralRe: convert from size_t to unsigned int Pin
Eytukan28-Jul-07 3:33
Eytukan28-Jul-07 3:33 
GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 3:38
George_George28-Jul-07 3:38 
GeneralRe: convert from size_t to unsigned int Pin
Eytukan28-Jul-07 4:14
Eytukan28-Jul-07 4:14 
GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 19:30
George_George28-Jul-07 19:30 
AnswerRe: convert from size_t to unsigned int Pin
bob1697228-Jul-07 5:18
bob1697228-Jul-07 5:18 
GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 19:33
George_George28-Jul-07 19:33 
GeneralRe: convert from size_t to unsigned int Pin
bob1697228-Jul-07 20:43
bob1697228-Jul-07 20:43 
GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 21:55
George_George28-Jul-07 21:55 
GeneralRe: convert from size_t to unsigned int Pin
bob1697229-Jul-07 18:13
bob1697229-Jul-07 18:13 
GeneralRe: convert from size_t to unsigned int Pin
George_George29-Jul-07 18:25
George_George29-Jul-07 18:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.