| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | GCC says parse error |
Hello Thomas!
Replying to a message of Thomas Waldmann to Erik Huelsmann:
TW> Hello Erik,
EH>> // init
EH>> BOOL TEditWindow::init()
EH>> {
EH>> TWindow::init;
TW> ^^^^^^^^^^^^^^ huh ? forgotten the () ???
EH>> setTitle(Title);
EH>> // the following line is the line with the parse error:
EH>> Editor=new TMultiLineEditText(this,0,0,width,height,STDATTR);
EH>> return (Editor==NULL);
EH>> }
EH>> Why is the line with the parse error an error??
TW> Because the parser got weird some lines before ?
Well, it does not from the (), because they are there now, but it did not work.
Here is the complete source-code, so all of you can have a look at it.. I
would not know what is wrong with the code..
======== start of stdwin.cc
#include"stdwin.h"
#include"memory.h"
#define STDATTR = MultiLineEditTxtAttr(false,true,true,false,false,false)
// TEditWindow
TEditWindow::TEditWindow( ULONG id , TWinBase *parent, char *aTitle):
TWindow(id,parent)
{
Editor = NULL;
Title = new char[sizeof(aTitle)];
memcpy(aTitle,Title,sizeof(aTitle));
}
// ~TEditWindow
TEditWindow::~TEditWindow(void)
{
if (Editor != NULL)
{
delete Editor;
};
~TWindow;
return;
};
// init
BOOL TEditWindow::init()
{
TWindow::init();
setTitle(Title);
Editor=new TMultiLineEditText(this,0,0,width,height,STDATTR);
return (Editor==NULL);
}
// getClassName
const char *TEditWindow::getClassName(void)
{
return "TEditWindow";
}
============= end of stdwin.cc
============= start of stdwin.h
#include
#include"window.h"
#include"mledtext.h"
class TEditWindow: public TWindow
{
protected:
char *Title; // window-title
TMultiLineEditText *Editor; // is pointer to associated edittext
public:
TEditWindow( ULONG id , TWinBase *parent, char *aTitle);
virtual ~TEditWindow();
virtual BOOL init();
virtual const char *getClassName(void);
};
============= end of stdwin.h
and here is the error of GCC:
stdwin.cc: In method `TEditWindow::~TEditWindow()':
stdwin.cc:21: parse error before `;'
stdwin.cc: In method `long unsigned int TEditWindow::init()':
stdwin.cc:30: parse error before `='
Bye, Erik!
--- FleetStreet 1.10 NR
* Origin: Help I forgot an origin (2:500/19.1929)SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 500/19 9 28/777 2/777 105/42 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.