W
worlman385
Why the following header file - database.h must put
class Database;
class Table;
at the beginning?
Is that if I define multiple Class in a single .h file, then I need to
put all Class name at the beginning?
================
class Database;
class Table;
class Database
{
public:
CnnPtr m_Cnn;
char m_ErrStr[500];
Database();
bool Open(char* UserName, char* Pwd,char* CnnStr);
bool Execute(char* CmdStr, Table& Tbl);
void GetErrorErrStr(char* ErrStr);
};
class Table{
public:
RecPtr m_Rec;
char m_ErrStr[500];
Table();
void GetErrorErrStr(char* ErrStr);
int ISEOF();
HRESULT MoveNext();
HRESULT MovePrevious();
HRESULT MoveFirst();
HRESULT MoveLast();
bool Get(char* FieldName, char* FieldValue);
bool Get(char* FieldName,SYSTEMTIME& FieldValue);
bool Get(char* FieldName,float& FieldValue);
bool Get(char* FieldName,double& FieldValue);
bool Get(char* FieldName,double& FieldValue,int Scale);
bool Get(char* FieldName,long& FieldValue);
BOOL VariantTimeToSystemTimeWithMilliseconds (/*input*/ double
dVariantTime, /*output*/SYSTEMTIME *st);
};
class Database;
class Table;
at the beginning?
Is that if I define multiple Class in a single .h file, then I need to
put all Class name at the beginning?
================
class Database;
class Table;
class Database
{
public:
CnnPtr m_Cnn;
char m_ErrStr[500];
Database();
bool Open(char* UserName, char* Pwd,char* CnnStr);
bool Execute(char* CmdStr, Table& Tbl);
void GetErrorErrStr(char* ErrStr);
};
class Table{
public:
RecPtr m_Rec;
char m_ErrStr[500];
Table();
void GetErrorErrStr(char* ErrStr);
int ISEOF();
HRESULT MoveNext();
HRESULT MovePrevious();
HRESULT MoveFirst();
HRESULT MoveLast();
bool Get(char* FieldName, char* FieldValue);
bool Get(char* FieldName,SYSTEMTIME& FieldValue);
bool Get(char* FieldName,float& FieldValue);
bool Get(char* FieldName,double& FieldValue);
bool Get(char* FieldName,double& FieldValue,int Scale);
bool Get(char* FieldName,long& FieldValue);
BOOL VariantTimeToSystemTimeWithMilliseconds (/*input*/ double
dVariantTime, /*output*/SYSTEMTIME *st);
};