Hello, all,
My most recent assignment has me working on a medium- to large-sized
Windows-based C++ software project. My background is entirely on UNIX
systems, where it appears that most of my peers were writing "better" C++
code. By "better" I mean that it more regularly looked like C++ (use of
objects, streams, exceptions, and ANSI-compliance) whereas some of my recent
Windows-based C++ peers rely on un-portable, operating-system specific
methods. Also, there's a preponderance of C-style character/file operations
(sprintf(), fprintf(), etc.)
I've always believed in the C++ stream operations because I found them
intuitive and robust. My old team had also decided that mixing the two
stream operations was bad style and mandated that we stick to C++ streams.
I also have concerns about the operation of the C-style character operations
in the presence of exceptions. Given that they were written for C, they
probably are NOT exception-safe, right?
Is the use of C-style character/stream operations in our C++ project
something I should worry about? For those of you that are developing C++
code in Windows system, do you find that this free selection between these
two choices is prevalent? For what reasons should I or should I not worry
about this? What are recommended alternatives to generate the most
reliable, ANSI-compliant code on systems where C++-style streams are not
common?
Thanks!
Scott
--
Remove .nospam from my e-mail address to mail me.
http://www.e-scott.net