Click here to Skip to main content
15,891,942 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to interact with IE Browser? Pin
Ganesh_T9-May-06 19:38
Ganesh_T9-May-06 19:38 
QuestionIs there any CInt function - VB in c++? Pin
Joy Anne9-May-06 18:41
Joy Anne9-May-06 18:41 
AnswerRe: Is there any CInt function - VB in c++? Pin
Maxwell Chen9-May-06 18:52
Maxwell Chen9-May-06 18:52 
GeneralRe: Is there any CInt function - VB in c++? Pin
Stephen Hewitt9-May-06 19:55
Stephen Hewitt9-May-06 19:55 
GeneralRe: Is there any CInt function - VB in c++? Pin
Stephen Hewitt9-May-06 21:27
Stephen Hewitt9-May-06 21:27 
GeneralRe: Is there any CInt function - VB in c++? Pin
Maxwell Chen9-May-06 22:36
Maxwell Chen9-May-06 22:36 
GeneralRe: Is there any CInt function - VB in c++? Pin
Maxwell Chen9-May-06 23:08
Maxwell Chen9-May-06 23:08 
GeneralRe: Is there any CInt function - VB in c++? Pin
Stephen Hewitt10-May-06 2:08
Stephen Hewitt10-May-06 2:08 
I would guess so - nevertheless they shouldn't be used. Here are some reasons:
- A wrong "bad" can cause havoc yet, if C-style casts are used you can’t “grep” the source code for them.
- There are many distinct reasons to cast. For example, one is to remove const-ness; another is to “down-cast” in a class hierarchy. With C-style casts all casts look the same and so you have to guess at the intent. Function style casts are explicit and self documenting in this respect.
- With C-style casts a simple mistake can change the type of cast and result in unintentional behaviour. For example if your casting to remove const-ness and then you change the type you’re casting it can changes into a “reinterpret” cast. With function style casts the compiler makes sure you can’t cast “more” then you should. i.e. a const_cast can only remove const-ness and not change the type.
- Casting is ugly – a well designed program shouldn’t have any – or at most only a few in the lowest level of a system. Casts should be ugly as design errors should be visible.

I could go on. There are just so many problems it just not funny.



Steve
GeneralRe: Is there any CInt function - VB in c++? Pin
Maxwell Chen10-May-06 3:46
Maxwell Chen10-May-06 3:46 
GeneralRe: Is there any CInt function - VB in c++? Pin
Stephen Hewitt10-May-06 14:03
Stephen Hewitt10-May-06 14:03 
GeneralRe: Is there any CInt function - VB in c++? Pin
Maxwell Chen9-May-06 23:21
Maxwell Chen9-May-06 23:21 
AnswerRe: Is there any CInt function - VB in c++? Pin
Nibu babu thomas9-May-06 18:53
Nibu babu thomas9-May-06 18:53 
GeneralRe: Is there any CInt function - VB in c++? Pin
Maxwell Chen9-May-06 19:03
Maxwell Chen9-May-06 19:03 
GeneralRe: Is there any CInt function - VB in c++? Pin
Nibu babu thomas9-May-06 19:04
Nibu babu thomas9-May-06 19:04 
GeneralRe: Is there any CInt function - VB in c++? Pin
Maxwell Chen9-May-06 19:06
Maxwell Chen9-May-06 19:06 
GeneralRe: Is there any CInt function - VB in c++? Pin
Nibu babu thomas9-May-06 19:08
Nibu babu thomas9-May-06 19:08 
GeneralRe: Is there any CInt function - VB in c++? Pin
Maxwell Chen9-May-06 19:10
Maxwell Chen9-May-06 19:10 
AnswerRe: Is there any CInt function - VB in c++? Pin
kiran janaswamy9-May-06 18:56
kiran janaswamy9-May-06 18:56 
GeneralRe: Is there any CInt function - VB in c++? Pin
Stephen Hewitt9-May-06 19:34
Stephen Hewitt9-May-06 19:34 
AnswerRe: Is there any CInt function - VB in c++? Pin
Hamid_RT9-May-06 18:59
Hamid_RT9-May-06 18:59 
AnswerRe: Is there any CInt function - VB in c++? Pin
csc9-May-06 19:04
csc9-May-06 19:04 
AnswerRe: Is there any CInt function - VB in c++? Pin
Maxwell Chen9-May-06 19:08
Maxwell Chen9-May-06 19:08 
GeneralRe: Is there any CInt function - VB in c++? Pin
Hamid_RT9-May-06 19:11
Hamid_RT9-May-06 19:11 
AnswerRe: Is there any CInt function - VB in c++? Pin
Stephen Hewitt9-May-06 19:25
Stephen Hewitt9-May-06 19:25 
Questionoperatin system name Pin
RockyJames9-May-06 18:35
RockyJames9-May-06 18:35 

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.