Index: [thread] [date] [subject] [author]
  From: Garrett Mitchener <wgm2@acpub.duke.edu>
  To  : 
  Date: 16 Feb 1999 14:46:53 -0500

Re: Error

Janel Levon Baskerville <jlb18@duke.edu> writes:

> Does anyone know what this error means: 
> 
> drawtable.cc:12: return type specification for constructor invalid?
> 
> Any help is greatly appreciated.

When you declare and define a constructor, just leave out the return
type.  These are special functions that don't return anything in the
usual sense, and the compiler does all the work for you.  Instead of:

class Thingee
{
public:
  void Thingee(...);
};

void Thingee::Thingee(...)
{
}

leave out the void's:

class Thingee
{
public:
  Thingee(...);
};

Thingee::Thingee(...)
{
}

	-- Garrett :-)


Index: [thread] [date] [subject] [author]