|
From: James G. <Jam...@Cl...> - 2001-01-22 13:14:49
|
Can you show us the header code you have defined for the class method in
question?
It sometimes helps if we can see the code to understand what went wrong.
It could possibly be that you have declared and defined the method in the
header, something like...
class wibble
{
public:
int get_wibble() {};
...
};
Here you have defined the method get_wibble and created an empty definition
of the code. Remove the superfluous {} and add the following in to the .cpp
file...
int wibble::get_wibble()
{
return 1+1;
}
Regards,
James.
-----Original Message-----
From: Gregor Peter [mailto:Gre...@dl...]
Sent: Monday, January 22, 2001 12:43 PM
To: dev...@li...
Subject: [Dev-C++] compiler error ?!?
Hi folks,
I deklarated a class 'Gerts' with some methods in a header file named
'GERTS.hpp'
The Implementation of that constructor and the methods are contained in
a file called 'GERTS.cpp' which contains the precompiler command
#include "GERTS.hpp".
The compiler complains now with the following error message:
7 gerts.cpp `Gerts::Gerts()' has already been declared in `Gerts'
which points to the constructor.
It is the same with all the deklarated methods:
83 gerts.cpp `Gerts::RegPicture(Picture *)' has already been
declared in `Gerts'
98 gerts.cpp `Gerts::GetMaxNumberOfPics()' has already been declared
in `Gerts'
... (and so on for ALL 32 methods)
Has anybody a idea what went wrong?
Gregor
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This electronic message and any attachment is intended to be
read by the named addressee(s) only.
Any other recipient should be aware that its contents may be
legally privileged and/or confidential and that its use,
disclosure, copying or distribution may be unlawful.
Unless you are a named addressee, please delete this message
Whilst C. & J. Clark International Limited has taken steps
to prevent the transmission of computer viruses with electronic mail,
responsibility for screening incoming messages and the risk of such
transmission and its consequences lies with the recipient.
C. & J. Clark International Limited
Registered in England and Wales
Company No. 141015
Registered Office: 40 High Street, Street, Somerset BA16 0YA
Telephone: +44 (0) 1458 443131
Fax: +44 (0) 1458 447547
|