Using Kylix (for the first time)...
Rob Wehrli
plug-devel@lists.PLUG.phoenix.az.us
Tue Jul 24 17:44:01 2001
> man , i just came to realization .
> i need to learn c .
> any suggestions on where to start? im very prone to starting and not
> finishing stuff....... any ideas?
>
If you are an absolute beginner, this is the book that I recommend:
http://www.amazon.com/exec/obidos/ASIN/0672305224/
You can usually buy one used very inexpensively. While you may choose to
use GCC under Linux, the book also comes with a disk with a simple C (and
C++) compiler that allows you to learn C and write simple programs that may
only be executed from inside the environment. The sample source is not
readily "UNIX" conformant (eight-dot-three filenames, all filenames in CAPS,
etc.) and, if I remember correctly, copious amounts of #include <conio.h>
but the simplified text and gentle approach to data types, functions and
such are useful to newcomers.
However, I also like to recommend:
http://www.amazon.com/exec/obidos/ASIN/187441629X
...which is more "C++" oriented, even though the first 3/4 of the book is
very C-ish. (The only real difference between it and C books are the uses
of cout versus printf.)
I tend to recommend learning C and the mechanics of the language before
learning C++, especially under UNIX. With C, you can do most of everything
that you'd want to do for UNIX and Linux.
I've often thought of writing a decent learning C book, but there are so
many out there that it is a tough sell to publishers. To me, the books on C
are not the way to teach beginners to programming. The basics of
programming are in understanding data types and how important it is that we
manipulate them effectively. Learning C is a good way to get started
without all of the complexities of C++. Remember that C++ is a vast
superset of C, so it is nearly infinitely more involving. I'd by the first
book and just start going through it, typing in line-by-line everything in
it. By the time you get through the first couple of chapters, you'll
probably be exploring things that aren't mentioned in the book--or if they
are mentioned, later in the book.
Most basic "learning C" books start out teaching about the pre-processing,
compilation and linking then jump into a "simple program" then explain the
program and then jump into basic data types and then functions and then
complex data types then pointers, file I/O, memory management, etc. My
"introduction to C" would start with explaining why we need places for data
and ways to manipulate the data. Too many books (IMHO) start by telling you
more of how to do it then why it is necessary. What happens from this
"bass-ackward" (to me) approach is that you have to learn how to do
something before you understand why it is necessary. That is like telling
someone; well, you cut a board in half, nail the two halves together
then...after it starts looking like a _fill-in-the-blank_ oh, and by the
way, you can use it for...the, now obvious reason...and rarely for other
reasons that are less obvious. I find that by explaining the WHY to
someone, it opens up all sorts of possibilities and people quit thinking of
every thing as a nail simply because they have a hammer in their toolbox.
Take Care.
Rob!