Click to See Complete Forum and Search --> : So where's the manual? :D


MBMarduk
06-18-2001, 03:32 PM
Hi guys,

I'll get to the title in a sec.
As a total programming newbie I'm trying my hand at C++.
I got this thick book for newbies ("Using C++", 1998, Que Books - MacMillan Publishing, UNUSED) as a bargain I couldn't pass up ($ 7.50).

The book says in bold letters Covers ANSI Standard C++, so I thought it's usable for any platform.

Now I started out writing a proggy of mine (the book doesn't have real excercises or tutorials) and as you might've guessed the sucker wouldn't compile.

Now I know it must be a beginners error so I wish to find it out for myself.

The book says this:

It's rare to write a program that compiles properly the first time. You usually have small typographical errors. The compiler finds these errors and displays corresponding warning and error messages. The best course of action to take when you get a compiler error that doesn't make sense is to refer to the error number in your compiler's reference manual.


So where's the manual for g++? :D (no, not the manpages, I've read those!)

Well, not really "where".
I haven't yet seen any exit *codes* coming from g++, and even if I did I wouldn't know where to find their explanations.

What the book says sound very plausible to me though, is there some way that g++ gives error codes? And a way to decipher them?

I mean, that would save you from answering cheesy newbie questions here. :)

TIA
-mike

Marcel2008
06-18-2001, 04:51 PM
Here you go:
http://www.gnu.org/software/gcc/onlinedocs/

Have fun!

MBMarduk
06-19-2001, 07:12 AM
Thanks!

It wasn't what I needed though. :(

Qubit
06-19-2001, 01:18 PM
Heh, GCC always gives "parse errors before ..." so it's not very helpful...

The best thing to do is always compile with "-Wall" toggled: this will give you all possible warnings, because it happens a lot that you make a mistake which isn't treated by the compiler as such. (For example not initializing variables, typing "," where you meant something else)

kmj
06-20-2001, 08:30 AM
if your program didn't compile, there must have been some error. The output of GCC should give you some clue as to where this error is occurring and (hopefully) whay kind of error it is. Ignore that whole bit about the reference manual; I've never looked at a reference manual for a compiler... See what line the error is on, and look around there for your problem. If you can't seem to figure out at all where the error is or what is causing it, feel free to post the output of g++ here.