#include < stdio.h > #include < stdlib.h > #include < iostream.h > #include < fstream.h > #include < string.h > #include < math.h > #define MAX_ROW_LENGTH 1200 #define MAX_FIELD_NUMBER 30 typedef struct head // dbf头文件结构 { unsigned char mask . unsigned char date[3] . unsigned long record_num. unsigned short int head_length. unsigned short int field_length . } HEAD .
typedef struct field // dbf字段结构 { unsigned char name[11]. unsigned char type . unsigned long add. unsigned char length. unsigned char dec . } FIELD .
int main(int argc,char **argv) { char buf[MAX_ROW_LENGTH],dbf[40],*sqlload. unsigned int i,field_num. HEAD *dbfhead . FIELD dbffield[MAX_FIELD_NUMBER]. FILE *fout, *fp.