为何报类型异常?好象和vector.h list.h有关
为何报类型错误?好象和vector.h list.h有关?
//gloabalfuntion.h
#ifndef gloabalfuntionH
#define gloabalfuntionH
//---------------------------------
float __fastcall calinterval(String selectedfield);
#endif
//gloabalfuntion.cpp
//---------------------------------
#pragma hdrstop
#include <vector.h>
#include <list.h>
#include "gloabalfuntion.h "
//-----------------------------------
#pragma package(smart_init)
float __fastcall calinterval(String selectedfield)
{
//函数体
}
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
//Unit1.h
#ifndef Unit1H
#define Unit1H
//--------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//--------------------------------------------
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
//Unit1.cpp
#include <vcl.h>
#pragma hdrstop
#include <vector.h>
#include <list.h>
#include "gloabalfuntion.h "
#include "Unit1.h "
//-----------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm "
TForm1 *Form1;
//-------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//-----------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
//gloabalfuntion.h
#ifndef gloabalfuntionH
#define gloabalfuntionH
//---------------------------------
float __fastcall calinterval(String selectedfield);
#endif
//gloabalfuntion.cpp
//---------------------------------
#pragma hdrstop
#include <vector.h>
#include <list.h>
#include "gloabalfuntion.h "
//-----------------------------------
#pragma package(smart_init)
float __fastcall calinterval(String selectedfield)
{
//函数体
}
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
//Unit1.h
#ifndef Unit1H
#define Unit1H
//--------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//--------------------------------------------
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
//Unit1.cpp
#include <vcl.h>
#pragma hdrstop
#include <vector.h>
#include <list.h>
#include "gloabalfuntion.h "
#include "Unit1.h "
//-----------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm "
TForm1 *Form1;
//-------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//-----------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)