Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ style casting Pin
Stephen Hewitt17-Jul-06 14:15
Stephen Hewitt17-Jul-06 14:15 
GeneralRe: C++ style casting Pin
David Crow18-Jul-06 2:46
David Crow18-Jul-06 2:46 
GeneralRe: C++ style casting Pin
Stephen Hewitt18-Jul-06 3:58
Stephen Hewitt18-Jul-06 3:58 
GeneralRe: C++ style casting Pin
Maximilien17-Jul-06 5:36
Maximilien17-Jul-06 5:36 
GeneralRe: C++ style casting Pin
toxcct17-Jul-06 5:37
toxcct17-Jul-06 5:37 
GeneralRe: C++ style casting Pin
Maximilien17-Jul-06 6:31
Maximilien17-Jul-06 6:31 
GeneralRe: C++ style casting Pin
David Crow17-Jul-06 6:51
David Crow17-Jul-06 6:51 
GeneralRe: C++ style casting Pin
Jörgen Sigvardsson17-Jul-06 9:03
Jörgen Sigvardsson17-Jul-06 9:03 
Robert Edward Caldecott wrote:
I can't believe I haven't come across the x = type(y); syntax before. I asked some other C/C++ old-timers here and they hadn't seen it either. Mad. Always something new to learn!

I use it all the time. I use that syntax because it looks like a constructor, rather than a cast. Easier to type than static_cast, and just as easy to search for as static_cast. It's a bit dangerous, as it works like a reinterpret_cast, but hey! I've grown up, and I don't need mommy to hold my hand. Wink | ;) (Lots of drugs are required before I start casting HANDLEs to BYTEs, etc. Since I don't use drugs, I don't worry much about bad casts. Big Grin | :-D )


--
80 percent entertainment by volume
GeneralRe: C++ style casting Pin
Zac Howland17-Jul-06 9:49
Zac Howland17-Jul-06 9:49 
GeneralRe: C++ style casting Pin
Stephen Hewitt17-Jul-06 14:16
Stephen Hewitt17-Jul-06 14:16 
GeneralRe: C++ style casting Pin
Zac Howland17-Jul-06 16:06
Zac Howland17-Jul-06 16:06 
GeneralRe: C++ style casting [modified] Pin
Jörgen Sigvardsson17-Jul-06 15:13
Jörgen Sigvardsson17-Jul-06 15:13 
GeneralRe: C++ style casting Pin
Zac Howland17-Jul-06 16:12
Zac Howland17-Jul-06 16:12 
GeneralRe: C++ style casting Pin
Zac Howland17-Jul-06 9:46
Zac Howland17-Jul-06 9:46 
QuestionBackground color Pin
goodoljosh198017-Jul-06 5:06
goodoljosh198017-Jul-06 5:06 
AnswerRe: Background color Pin
SimonSays17-Jul-06 6:05
SimonSays17-Jul-06 6:05 
GeneralRe: Background color Pin
goodoljosh198017-Jul-06 9:14
goodoljosh198017-Jul-06 9:14 
AnswerRe: Background color Pin
Hamid_RT17-Jul-06 18:14
Hamid_RT17-Jul-06 18:14 
QuestionExporting function objects from DLL Pin
napoleaninlondon17-Jul-06 4:52
napoleaninlondon17-Jul-06 4:52 
AnswerRe: Exporting function objects from DLL Pin
Cedric Moonen17-Jul-06 4:57
Cedric Moonen17-Jul-06 4:57 
GeneralRe: Exporting function objects from DLL Pin
napoleaninlondon17-Jul-06 5:04
napoleaninlondon17-Jul-06 5:04 
GeneralRe: Exporting function objects from DLL Pin
Cedric Moonen17-Jul-06 5:10
Cedric Moonen17-Jul-06 5:10 
GeneralRe: Exporting function objects from DLL Pin
napoleaninlondon17-Jul-06 5:18
napoleaninlondon17-Jul-06 5:18 
GeneralOT Pin
Eytukan17-Jul-06 6:25
Eytukan17-Jul-06 6:25 
GeneralRe: OT Pin
Cedric Moonen17-Jul-06 6:32
Cedric Moonen17-Jul-06 6:32 

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.