Discussion Locked

Learn the lessons of implicit conversion

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Learn from implicit conversion of stream objects to pointers:

The June 25, C++ TechMail teaches the lessons learned from implicit conversion of stream objects to pointers. Were you aware of the dangers of implicit conversion? Do you have additional caveats to add to the discussion?

If you haven't subscribed to the C++ TechMail, there is no better time to take advantage of our free e-newsletter. Visit our e-newsletter subscription center to subscribe to this valuable TechMail today:

http://builder.com.com/techmails.jhtml?repID=u001

1 reply

by railroad buff

Is there an archive where I could read your article? I signed up for the C++ Newsletter only a few days ago ...

On the subject matter, after 25+ years of Fortran and 6+ years of C/C++, I am a staunch supporter of having EVERY type conversion explicit. That includes long to short, even int to short, anything to char or unsigned char, you name it. Readers of my code will complain that I use the old C-style cast rather than the fancy C++ standard, but it does the job. (For caveats, read Scott Meyers' Effective C++ series.)

Cheers, Jochen

This discussion is closed to new replies.