首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

高手们,帮帮忙!解决方法

2012-02-23 
高手们,帮帮忙!!!classpoint{protected:intx,ypublic:point(intx320,inty240)}//-------------------

高手们,帮帮忙!!!
class   point
{
    protected:
          int   x,   y;

    public:
          point(int   x   =   320,int   y   =   240);
};
//-----------------------------------------
class   circles:virtual   public   point
{
    int   radius;
    public:
        circles(int   x,int   y,int   radius);
        void   show(TCanvas   canvas);   //   这里提示一个错误是   expected
};

请问高手们,这是个什么错误啊??急!!!1


[解决办法]
TCanvas *canvas
bcb里面对于vcl的类不能用对象,只能用指针
[解决办法]
也可能是少了头文件,我这编译没有问题
//---------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------
class point
{
protected:
int x, y;

public:
point(int x = 320,int y = 240);
};
//-----------------------------------------
class circles:virtual public point
{
int radius;
public:
circles(int x,int y,int radius);
void show(TCanvas canvas); // 这里提示一个错误是 expected
};
class TForm1 : public TForm
{
__published:// IDE-managed Components
TButton *Button1;
void __fastcall Button1Click(TObject *Sender);
private:// User declarations
public:// User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------
#endif

[解决办法]
BCB里的API不知道有哪些跟谈不上用怎么办?

热点排行