Richard,
> I'm looking for a user's guide for C++ under linux (g++ in this case).
> I'm an experienced C programmer but I'm moving substantial portions of code
> to C++. I basically need a reference manual with examples; in particular
> file and stream I/O operations.
C++ is a tight language whose primary benefit is the ease with which
it does the bookkeeping of object-oriented programming. If you are used to
ignoring C warnings, DO NOT IGNORE C++ WARNINGS. Object-oriented programming
lets you write code 10x faster, if you KEEP THE BLACKBOXES BLACK. The first
time you open the blackbox, you will lose the benefits. C++ will warn you,
but you must FIX EVERY WARNING. If you ignore the warnings, you will still
pay the overhead of object-oriented programming.
I have seen several dozen projects by over a dozen companies try to
port code from C to C++. It has rarely been other than a resounding success
or failure. If the porters had no object-oriented experience (~50%), it
was always a failure. If the porters had object-oriented experience and
redesigned program structure (rather than copy each function) (~25%), it
always succeeded. For the remainder, success correlated with prototyping
and learning time. Throwing a prototype away, quadruples the chance of
success. 80hr of object-oriented class and homework, quadruples the chance
of success over 10hr.
I recommend the following:
Tutorial:
Foundations of C++ and Object-Oriented Programming
by Namir C. shammas
pub. by IDG Books
ISBN 1-56884-709-2
C++: The Core Language
by GregorySatir and Doug Brown
pub. by O'Reilly & Associates, Inc.
ISBN 1-56592-116-X
STL Tutorial and Reference Guide
by David R. Musser and Atul Saini
pub. by Addison Wesley, Inc.
ISBN 0-201-63398-1
Reference:
The C++ Programming Language
by Bjarne Stroustrup
pub. by Addison Wesley, Inc.
ISBN 0-201-88954-4
C++ IOStreams Handbook
by Steve Teale
pub. by Addison Wesley, Inc.
ISBN 0-201-59641-5
The Draft Standard C++ Library
by P.J. Plauger
pub. by Prentice Hall
ISBN 0-13-117003-1
Economical Programming:
Effective C++
by Scott Meyers
pub. by Addison Wesley, Inc.
ISBN 0-201-92488-9
More Effective C++
by Scott Meyers
pub. by Addison Wesley, Inc.
ISBN 0-201-63371-X
--
TASK: Shoot yourself in the foot.
C: Put the gun together, pack the bullet, load the bullet, and
pull the trigger. You then find that you forgot to point
the gun at the target.
C++: You accidentally create a dozen instances of yourself and shoot
them all in the foot.
LISP: You shoot yourself in the appendage which holds the gun with
which you shoot yourself in the appendage which holds the gun
with which you ...
FORTH: Foot yourself in you shoot.
BASIC: Shoot yourself in the foot with a water pistol. On large
systems, continue until entire lower body is waterlogged.
Unix: % ls
foot.c foot.h foot.o toe.c toe.o
% rm * .o
rm:.o no such file or directory
% ls
Assembler: You try to shoot yourself in the foot, only to discover you
must first invent the gun, the bullet, the trigger, and your
foot.
Dr. Robert J. Meier
1-248-650-9488
[EMAIL PROTECTED]