Mail Archives: djgpp/1998/01/30/07:31:40
From: | Gruber Gerhard <g DOT gruber AT sis DOT co DOT at>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | problem with list class
|
Date: | Fri, 30 Jan 1998 11:39:09 +0100
|
Organization: | APAnet
|
Lines: | 63
|
Message-ID: | <34D1ADCD.5CBB9988@sis.co.at>
|
NNTP-Posting-Host: | 192.56.14.75
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I tried the following sample source to compile but I get errormessages:
debug.cpp(5) Error: parse error before `{'
debug.cpp(11) Error: destructors must be member functions
debug.cpp(12) Error: parse error before `}'
debug.cpp(24) Error: no `CWindow::CWindow()' member function declared in
class 'CWindow'
In method `CWindow::CWindow()':
debug.cpp(25) Error: `x' undeclared (first use this function)
debug.cpp(25) Error: (Each undeclared identifier is reported only once
debug.cpp(25) Error: for each function it appears in.)
debug.cpp(26) Error: `y' undeclared (first use this function)
At top level:
debug.cpp(31) Error: prototype for `CWindow::~CWindow()' does not match
any in class 'CWindow'
debug.cpp(24) Error: candidate is: CWindow::CWindow()
In method `CWindow::~CWindow()':
debug.cpp(32) Error: `sizeof' applied to an incomplete type
There were some errors
---------------------------------------------
#include <list.h>
/* typedef class list CList; */
class CWindow : public list {
protected:
int x, y;
public:
CWindow(void);
~CWindow(void);
};
main()
{
return(0);
}
CWindow::CWindow(void)
{
x = 0;
y = 0;
}
CWindow::~CWindow(void)
{
}
--
Bye,
Gerhard
email: gruber2 AT ibm DOT net
g DOT gruber AT sis DOT co DOT at
FIDO: Gruber_Gerhard AT 2:310/81.11
- Raw text -