![]() |
|
|||||
|
||||||
From: Paul Hirose (no email)
Date: Thu Sep 08 2005 - 16:32:58 EDT
george huxtable wrote:
> Exploring around, I've picked up a copy of C++, which I haven't tried; just
> reading the manual was enough to convince me that all the guff about
> object-oriented programming was not for me. Was that the right decision?
I wouldn't dismiss it based on the impressions gained from one book.
Perhaps its examples were so far from your interests that you couldn't
make a connection. Try a different book. If you still don't see anything
worthwhile in object oriented programming, forget about it.
A C++ program is not necessarily an object oriented program. The
language is essentially a superset of the older non-OO language C. You
can write a program as a single monolithic function, use only global
variables, and control the flow of execution with labels and gotos. That
would be bizarre even for a 1970s C program, but it does show the range
of programming paradigms that C++ can support.
> the manual
> I picked up, "C++ for Dummies", made no mention at all of any trig
> functions.
The author probably thought that was outside the scope of an
introductory book. In C++ there are three floating point types: float,
double, and long double. Each type has a full set of the usual
transcendental functions. Complex numbers are also available in float,
double, and long double. Each of those has its set of
transcendentals.
Have you considered Fortran? I'm serious. It's been said that most
scientists and engineers born before 1960 learned Fortran as their first
programming language. With a Fortran compiler you have access to lots of
their tools. For example, I have compiled the JPL DE/LE ephemerides into
a Windows DLL. It's a black box I can access from C++ (since I know
hardly any Fortran). Actually, the compiled Fortran can simply be linked
with C++ to make a single standalone executable instead of making a DLL.
But since I'd never done a DLL before, I took that route to learn
something new.
|