"Al-Burak" <[EMAIL PROTECTED]> writes:
> This is not a question where the source code is important,
Yes, it is. You saying it isn't doesn't make it so.
> This is a bug, obviously, and I will eventually find the bug; however
> my question is, does anyone here know a better way to find this kind of
> errors than to go line by line looking for the bug?
The *trivial* way to find this bug is as follows:
assuming 'g++ -c -I... Person.cc' is the command that fails, do
g++ -E -I... Person.cc > Person.ii
Now open 'Person.ii' in your editor, and search for 'class Person'.
There can not be more than one definition, i.e. 'class Person { ... };'
> Is there a
> parameter in GCC that I can use so that the compiler is more specific,
G++ is usually already specific enough, e.g.
$ cat junk.cc
class Person { int x; };
class Person { int x; };
$ g++ -c junk.cc
junk.cc:2: error: redefinition of `class Person'
junk.cc:1: error: previous definition of `class Person'
Here g++ tells me that I've redefined 'class Person' on line 2,
and where the previous definition is.
> or become more elaborate in what/where the error is?
In the future, you'll do well to at least post the error message
you are getting. You may also wish to read this:
www.catb.org/~esr/faqs/smart-questions.html
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus