Click here to Skip to main content
15,920,630 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAnimateWindow with controls on window Pin
hell_admin17-Jul-06 5:11
hell_admin17-Jul-06 5:11 
GeneralC++ style casting Pin
Rob Caldecott17-Jul-06 5:11
Rob Caldecott17-Jul-06 5:11 
GeneralRe: C++ style casting Pin
toxcct17-Jul-06 5:25
toxcct17-Jul-06 5:25 
GeneralRe: C++ style casting Pin
David Crow17-Jul-06 5:25
David Crow17-Jul-06 5:25 
GeneralRe: C++ style casting Pin
Nemanja Trifunovic17-Jul-06 5:35
Nemanja Trifunovic17-Jul-06 5:35 
GeneralRe: C++ style casting Pin
Rob Caldecott17-Jul-06 6:09
Rob Caldecott17-Jul-06 6:09 
GeneralRe: C++ style casting [modified] Pin
ricecake17-Jul-06 11:15
ricecake17-Jul-06 11:15 
GeneralRe: C++ style casting Pin
David Crow17-Jul-06 6:54
David Crow17-Jul-06 6:54 
GeneralRe: C++ style casting Pin
David Crow18-Jul-06 2:48
David Crow18-Jul-06 2:48 
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 
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 
Zac Howland wrote:
2) some knucklehead will come in and think he can safely cast anything to anything and use your code as an example

I think casts would be the least of this knuckleheads's troubles if he doesn't understand how casts work in C++. Unsure | :~

Zac Howland wrote:
you will find out that not using the C++-style casts will create an inconsistent coding style in your developments.

Yes, and no. If I start mixing the casts, then it'd be inconsistent. I use C++ casts to indicate that something worth paying attention to is happening. For instance - downcasts (static_cast), round-ball-into-square-hole-casts (reinterpret_cast), and dynamic casts (dynamic_cast). In essence, I only to constructor like casts when dealing with integral types. In that code, it's obvious what's going on - no need to pollute the visibility with lots of text.

My 2 cents.

--
As Foretold by Nostradamus
Last modified: den 17 juli 2006 20:09:40 --

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 

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.