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

C / C++ / MFC

 
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 
if your sure you will not go between 32-bit and 64-bit with this code someday then an explicit cast should eliminate the warning. Let the compiler know the conversion is not implicit and it will take your word for it that you know what your doing.

size_t First=45;
int Second=67;
unsigned int Third=98;

// Damned if you do
Second=(int)First;
Third=(unsigned int)First;

// Damned if you don't
Second=static_cast<int>(First);
Third=static_cast<int>(First);
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 
AnswerRe: convert from size_t to unsigned int Pin
Mark Salsbery28-Jul-07 6:44
Mark Salsbery28-Jul-07 6:44 
GeneralRe: convert from size_t to unsigned int Pin
George_George28-Jul-07 19:34
George_George28-Jul-07 19:34 
GeneralRe: convert from size_t to unsigned int Pin
Mark Salsbery30-Jul-07 4:53
Mark Salsbery30-Jul-07 4:53 
GeneralRe: convert from size_t to unsigned int Pin
George_George30-Jul-07 18:54
George_George30-Jul-07 18:54 
AnswerRe: convert from size_t to unsigned int Pin
Stephen Hewitt29-Jul-07 15:06
Stephen Hewitt29-Jul-07 15:06 
GeneralRe: convert from size_t to unsigned int Pin
George_George29-Jul-07 18:24
George_George29-Jul-07 18:24 
GeneralRe: convert from size_t to unsigned int Pin
Stephen Hewitt29-Jul-07 18:26
Stephen Hewitt29-Jul-07 18:26 
GeneralRe: convert from size_t to unsigned int Pin
George_George29-Jul-07 18:57
George_George29-Jul-07 18:57 
QuestionHow to search a value of a variable of an object in a list of objects Pin
beriho27-Jul-07 20:24
beriho27-Jul-07 20:24 
AnswerRe: How to search a value of a variable of an object in a list of objects Pin
Christian Graus27-Jul-07 20:41
protectorChristian Graus27-Jul-07 20:41 
GeneralRe: How to search a value of a variable of an object in a list of objects [modified] Pin
beriho27-Jul-07 20:58
beriho27-Jul-07 20:58 
AnswerRe: How to search a value of a variable of an object in a list of objects Pin
Eytukan28-Jul-07 5:18
Eytukan28-Jul-07 5:18 

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.