Hi guys,
I am trying to read a dBase file, using c++. The following snippet of code is used to check the first byte of a dBse file (whose version is unknown):
ifstream inFile("pat.dbf", ios::in|ios::binary);
unsigned char dBV = 0;
unsigned long id2 = 0;
inFile.read(&dBV,1); // byte 0
id2 = (dBV);
cout << "Raw value: " << (id2) << endl;
The output of running this is:
Raw Value: 48
This is somewhat conufusing ~ my notes on dBase say that version is stored in the first byte, in bits 0 - 2. However, this seems to indicate that the version is 0! Any ideas, and does version number REALLY make a difference in getting to unravel a dBase file?
Cheers, and merry christmas guys!
Andrew
I am trying to read a dBase file, using c++. The following snippet of code is used to check the first byte of a dBse file (whose version is unknown):
ifstream inFile("pat.dbf", ios::in|ios::binary);
unsigned char dBV = 0;
unsigned long id2 = 0;
inFile.read(&dBV,1); // byte 0
id2 = (dBV);
cout << "Raw value: " << (id2) << endl;
The output of running this is:
Raw Value: 48
This is somewhat conufusing ~ my notes on dBase say that version is stored in the first byte, in bits 0 - 2. However, this seems to indicate that the version is 0! Any ideas, and does version number REALLY make a difference in getting to unravel a dBase file?
Cheers, and merry christmas guys!
Andrew