这样定义为什么BCB通不过?

wt_sanlian 2003-04-02 11:21:34
typedef enum C_PictureType
{
PICTYPE_DEFAULT = 0,
PICTYPE_BITMAP = 1, //此处编译器说是语法错误
PICTYPE_METAFILE = 2,
PICTYPE_ICON = 3,
PICTYPE_ENHMETAFILE = 4,
PICTYPE_INTERNAL = 10,
PICTYPE_DXFFILE = 13
} C_PictureType;

怎么回事呢?

...全文
39 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
TopCat 2003-04-02
  • 打赏
  • 举报
回复
我在BCB5和BCB6都试过了,没有问题
wt_sanlian 2003-04-02
  • 打赏
  • 举报
回复
to sharkxie(tarzon)
你用的是BCB5吗?
sprewellkobe 2003-04-02
  • 打赏
  • 举报
回复
不会吧
sharkxie 2003-04-02
  • 打赏
  • 举报
回复
看我的
//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
typedef enum C_PictureType
{
PICTYPE_DEFAULT = 0,
PICTYPE_BITMAP = 1, //此处编译器说是语法错误
PICTYPE_METAFILE = 2,
PICTYPE_ICON = 3,
PICTYPE_ENHMETAFILE = 4,
PICTYPE_INTERNAL = 10,
PICTYPE_DXFFILE = 13
} C_PictureType;


class TForm1 : public TForm
{
__published: // IDE-managed Components
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
什么事也没有啊!
就new了一个Application然后加入
typedef enum C_PictureType
{
PICTYPE_DEFAULT = 0,
PICTYPE_BITMAP = 1, //此处编译器说是语法错误
PICTYPE_METAFILE = 2,
PICTYPE_ICON = 3,
PICTYPE_ENHMETAFILE = 4,
PICTYPE_INTERNAL = 10,
PICTYPE_DXFFILE = 13
} C_PictureType;
wt_sanlian 2003-04-02
  • 打赏
  • 举报
回复
是BCB5的BUG吗?
wt_sanlian 2003-04-02
  • 打赏
  • 举报
回复
程序很简单
//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
typedef enum C_PictureType
{
PICTYPE_DEFAULT = 0,
PICTYPE_BITMAP = 1,
PICTYPE_METAFILE = 2,
PICTYPE_ICON = 3,
PICTYPE_ENHMETAFILE = 4,
PICTYPE_INTERNAL = 10,
PICTYPE_DXFFILE = 13
} C_PictureType;

class TForm1 : public TForm
{
__published: // IDE-managed Components
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
wt_sanlian 2003-04-02
  • 打赏
  • 举报
回复
E2184 Enum syntax error
E2040 Declaration terminated incorrectly
E2190 Unexpected }
xc2927 2003-04-02
  • 打赏
  • 举报
回复
可以啊
sharkxie 2003-04-02
  • 打赏
  • 举报
回复
我的可以啊!
你是不是有重名了!
什么错误提示?
gloom 2003-04-02
  • 打赏
  • 举报
回复
注意看看有没有非法字符如全角空格或全角标点
wt_sanlian 2003-04-02
  • 打赏
  • 举报
回复
BCB5通不过,BCB3可以通过,真是怪事!
gloom 2003-04-02
  • 打赏
  • 举报
回复
在我机器上编译正常啊,Win2000+Bcb6+Update4

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧