Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » (Basic) error inheriting RichEditWithToolbar
(Basic) error inheriting RichEditWithToolbar [message #30139] Sat, 11 December 2010 09:54 Go to next message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
I am trying to write a class named CMyRichEditWithToolbar to implement more methods. I have this:

(.H)

#ifndef _my_rich_ed_w_t_h
#define _my_rich_ed_w_t_h

#include <CtrlLib/CtrlLib.h>
using namespace Upp;

class CMyRichEditWithToolbar : public RichEditWithToolBar
{
public:
CMyRichEditWithToolbar();

};
#endif



(.CPP)

#include "MyRichEditWithToolbar.h"

CMyRichEditWithToolbar::CMyRichEditWithToolbar()
{
//Do I have to call something here?
}

The project has already all the support for RichText and for RichEdit. If I use RichTextWithToolbar it compiles and runs well.


When I compile CMyRichEditWithToolbar I see:

MyRichEditWithToolbar.cpp
In file included from C:\upp\MyApps\Example\MyRichEditWithToolbar.cpp:1:
C:\upp\MyApps\Example\/MyRichEditWithToolbar.h:8: error: expected class-name before '{' token
Example: 1 file(s) built in (0:02.99), 2994 msecs / file, duration = 3054 msecs

There were errors. (0:03.78)

It seems a basic C++ error but I cant soolve it alone.
Thanks a lot

Alex




[Updated on: Sat, 11 December 2010 09:56]

Report message to a moderator

Re: (Basic) error inheriting RichEditWithToolbar [message #30144 is a reply to message #30139] Sat, 11 December 2010 18:16 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

alex100 wrote on Sat, 11 December 2010 09:54

I am trying to write a class named CMyRichEditWithToolbar to implement more methods. I have this:

(.H)

#ifndef _my_rich_ed_w_t_h
#define _my_rich_ed_w_t_h

#include <CtrlLib/CtrlLib.h>
using namespace Upp;

class CMyRichEditWithToolbar : public RichEditWithToolBar
{
public:
CMyRichEditWithToolbar();

};
#endif



(.CPP)

#include "MyRichEditWithToolbar.h"

CMyRichEditWithToolbar::CMyRichEditWithToolbar()
{
//Do I have to call something here?
}

The project has already all the support for RichText and for RichEdit. If I use RichTextWithToolbar it compiles and runs well.


When I compile CMyRichEditWithToolbar I see:

MyRichEditWithToolbar.cpp
In file included from C:\upp\MyApps\Example\MyRichEditWithToolbar.cpp:1:
C:\upp\MyApps\Example\/MyRichEditWithToolbar.h:8: error: expected class-name before '{' token
Example: 1 file(s) built in (0:02.99), 2994 msecs / file, duration = 3054 msecs

There were errors. (0:03.78)

It seems a basic C++ error but I cant soolve it alone.
Thanks a lot

Alex






Hi Alex,

The problem is probably that RichEditWithToolbar is not declared. I believe you forgot to add the RichEdit pacakge to your package and/or "#include <RichEdit/RichEdit.h>".

Best regards,
Honza
Re: (Basic) error inheriting RichEditWithToolbar [message #30145 is a reply to message #30144] Sat, 11 December 2010 18:36 Go to previous message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
I added packages. I forgot the include Sad
Thanks a lot

Alex
Previous Topic: Index / Table of Contents in PDF ?
Next Topic: QTF question -how to insert a QTF string into an XML file?
Goto Forum:
  


Current Time: Thu Apr 18 15:54:00 CEST 2024

Total time taken to generate the page: 0.01939 seconds