[Top][All Lists]

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

Re: Learning C++ with gnu software?

From: Martin Dickopp
Subject: Re: Learning C++ with gnu software?
Date: Fri, 09 Jul 2004 23:57:12 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) (Cecil) writes:

> Hello. I will be installing gnu/linux on a laptop(toshiba libretto
> with 7 inch screen) in the next month or so, and have decided that I
> need to go with purely commandline because its easier on my eyes. I
> will be starting C++ in school soon(yes, back to school after the age
> of 30 sucks). Is there a book or web site that will help me learn C++
> in the context of using only gnu command line tools?

I believe the comp.lang.c++ FAQ (easily located with Google) has book
recommendations, and you can also ask in that newsgroup.

All good C++ books teach it in a command-line friendly way.  The reason
is that a beginner needs to learn the concepts first, and a GUI would
only be distracting during that phase.

> I really should say non-X windows based tools. Am I daft for
> considering this?

Not at all.

> But all my texts either refer to a ms windows Visual C++ ide or simply
> a g++ (insert whatever here).

Well, g++ is the command-line program to invoke the GNU C++ compiler.
To get you started, if you have your C++ source code in a file named, you can type the following line:

    g++ -g -O2 -Wall -o t
        \/ \-/ \---/ \--/ \--/
         |  |    |     |    this is the name of the source code file
         |  |    |     this means to write the executable to a file t
         |  |    this means to print more warnings (really recommended)
         |  this means to optimize the generated code
         this means to include debugging information in the executable

If no messages appear, that means your code has been successfully
translated.  You can then type ./t to run the executable.

> I have poked around emacs and it's rather intimidating. I'd like to
> get suggestions as to a good programmer's editor that will do syntax
> highlight and color and auto indent.

I do indeed find Emacs best suited for my needs as a programmer, so I
don't know any other editor.

> I'd like to learn about RCS or Subversion. I can understand how that
> could be a big help.

A version management system can indeed be a big help in medium-sized to
large projects, but I recommend that you focus on the language first.
You can learn other tools later.

> So, basically all the tutorials that talk about using debugger and all
> that in the course of teaching C++ from the ground up all refer to non
> gnu command line. Well, I'd like to learn it.

Start with an editor and the compiler.  All GNU programs come with
documentation, which often contains a tutorial section.

Good luck!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]