RE: C++ Compiling Problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Matthew Miller wrote:
>
> >
> > PS: if you want a book on C instead of C++, don't bother with
> anything but
> > the original book by the language's creators: C Programming Language by
> > Brian Kernighan and Dennis Ritchie. As I said before, C is an
> elegant and
> > small language, and this book is all you need. (Although you
> may also want
> > to pick up The UNIX Programming Environment by Kernighan and Rob Pike.)
> >
>
> K&R C is no longer current, and I think it will give gcc severe heartburn.

This statement is false.  As a matter of fact if you use the programming
methodology in this book, you're good to go on any true ANSI C compiler,
which includes gcc...

Directly from http://www.gnu.org about gcc: "The GNU Compiler Collection is
a full-featured ANSI C compiler with support for K&R C"

>
> There are altogether too many mistakes a C programmer can make that will
> give rise to all sorts of program bugs including buffer overruns,
> pointer overruns and underruns and many more.

Learn how to use the appropriate libraries/functions that limit the number
of input characters and buffer overruns are no issue.

>
> There are uses for C; it was originally designed for programming
> operating systems and such, and really is not well-suited at a
> general-purpose programming language.

This is false.  Read more about it here:
http://cm.bell-labs.com/cm/cs/who/dmr/chist.html.

>
> The act you _can_ write almost any program you can conceive in C doesn't
> mean you should do so.

This is true, but it depends on what you intend to do with the language.  I
don't know of any C based languages that can outperform C for computational
based  programming.

>
> C doesn't do strings.

This is false.  Read the "string.h" library.  It's specifically written to
handle strings.

> C doesn't do fixed-point.

I don't know what is meant by this.  If it means floating point, again this
is incorrect.  C is capable of performing computations with integers,
floats, and doubles.  What else is there?

> Both are needed in business applications.
>
> C++ is another matter altogether, and provided programmers use the C++
> features, code written in C++ is likely to be more reliable than
> equivalent code written by equivalently-capable C programmers.

If you want to learn an easy OOP then Java or C# are the best place to
start.  The foundations of all of the languages C++, Java, and C# are based
on C.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux