public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Using multiple base classes with g++
@ 2001-03-15  2:20 Sven Heinzel
  2001-03-15 14:06 ` Alexandre Oliva
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Heinzel @ 2001-03-15  2:20 UTC (permalink / raw)
  To: gcc-help

Hello,

I tried to build my own class from two base classes with the following
code:

  class Control : public QObject, public QThread
  {
  ...

but when I try to compile this, I get the error message:

  control.h:57: parse error before `{'

Line 57 is the line with the '{' from the example above.
Is the syntax different for g++ or is it just not possible to use two
base classes?

Thanks in advance.
Sven

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Using multiple base classes with g++
  2001-03-15  2:20 Using multiple base classes with g++ Sven Heinzel
@ 2001-03-15 14:06 ` Alexandre Oliva
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2001-03-15 14:06 UTC (permalink / raw)
  To: Sven Heinzel; +Cc: gcc-help

On Mar 15, 2001, Sven Heinzel <heinzel@dvs.de> wrote:

>   class Control : public QObject, public QThread
>   {

>   control.h:57: parse error before `{'

I guess class QThread hasn't been declared nor defined at that point.
A class must have already been defined for you to be able to use it as
a base class.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-03-15 14:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-15  2:20 Using multiple base classes with g++ Sven Heinzel
2001-03-15 14:06 ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).