读书人

#039;TTabControl#039; cannot start a parame

发布时间: 2012-04-11 17:42:33 作者: rapoo

'TTabControl' cannot start a parameter declaration Full parser context,接口出错!
5.H 文件代码
(错误就在)这句extern void sss(TTabControl *Sender);

C/C++ code
//---------------------------------------#ifndef Unit5H#define Unit5H//---------------------------------------extern void sss(TTabControl *Sender);#endif


5.CPP文件代码
C/C++ code
//---------------------------------------#pragma hdrstop#include "Unit5.h"//---------------------------------------#pragma package(smart_init)void sss(TTabControl *Sender){     TButton *newbtn=new TButton(Sender);     newbtn->Parent = Sender;}



错误信息
Checking project dependencies...
Compiling Project1.cbproj (Debug configuration)
[BCC32 Error] Unit5.h(7): E2147 'TTabControl' cannot start a parameter declaration
Full parser context
Unit5.cpp(5): #include Unit5.h
Failed
Elapsed time: 00:00:00.8


我接口这么写,出错了!希望前辈们给小弟一点指点!

[解决办法]
在Unit5.h文件中包含一个头文件。

C/C++ code
#ifndef Unit5H#define Unit5H#include <ComCtrls.hpp>//---------------------------------------extern void sss(TTabControl *Sender);#endif 

读书人网 >C++ Builder

热点推荐