Click here to Skip to main content
15,906,463 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help with structure and createThread function call Pin
Pecan2045-Feb-03 14:24
Pecan2045-Feb-03 14:24 
GeneralLinking additional obj's Pin
JohnEddy5-Feb-03 9:12
JohnEddy5-Feb-03 9:12 
GeneralRe: Linking additional obj's Pin
Joaquín M López Muñoz5-Feb-03 9:19
Joaquín M López Muñoz5-Feb-03 9:19 
GeneralRe: Linking additional obj's Pin
AlexO5-Feb-03 9:20
AlexO5-Feb-03 9:20 
GeneralRe: Linking additional obj's Pin
JohnEddy5-Feb-03 9:40
JohnEddy5-Feb-03 9:40 
Generalccalendar or cmonthcalendar Pin
youssef5-Feb-03 8:48
youssef5-Feb-03 8:48 
GeneralA simple question about CListCtrl::InsertItem Pin
lucy5-Feb-03 8:21
lucy5-Feb-03 8:21 
GeneralRe: A simple question about CListCtrl::InsertItem Pin
lucy5-Feb-03 8:50
lucy5-Feb-03 8:50 
GeneralRe: A simple question about CListCtrl::InsertItem Pin
xxhimanshu5-Feb-03 19:07
xxhimanshu5-Feb-03 19:07 
GeneralRe: A simple question about CListCtrl::InsertItem Pin
lucy6-Feb-03 2:32
lucy6-Feb-03 2:32 
GeneralRe: A simple question about CListCtrl::InsertItem Pin
Jean-Marc Molina3-Oct-03 0:26
Jean-Marc Molina3-Oct-03 0:26 
QuestionHow to transfer data in different views? Pin
hamchoy5-Feb-03 8:20
hamchoy5-Feb-03 8:20 
AnswerRe: How to transfer data in different views? Pin
lucy5-Feb-03 8:22
lucy5-Feb-03 8:22 
GeneralRe: How to transfer data in different views? Pin
hamchoy5-Feb-03 8:44
hamchoy5-Feb-03 8:44 
AnswerRe: How to transfer data in different views? Pin
Joaquín M López Muñoz5-Feb-03 8:40
Joaquín M López Muñoz5-Feb-03 8:40 
GeneralRemote Shell HTML interface Pin
TSrinivasR5-Feb-03 7:51
TSrinivasR5-Feb-03 7:51 
GeneralRe: Remote Shell HTML interface Pin
nde_plume5-Feb-03 14:07
nde_plume5-Feb-03 14:07 
GeneralRe: Remote Shell HTML interface Pin
TSrinivasR6-Feb-03 7:13
TSrinivasR6-Feb-03 7:13 
GeneralRe: Remote Shell HTML interface Pin
Abbas_Riazi5-Feb-03 22:07
professionalAbbas_Riazi5-Feb-03 22:07 
GeneralFree Gnu Makefiles for all Petzold programs Pin
John Kopplin5-Feb-03 6:16
John Kopplin5-Feb-03 6:16 
Generalpower to the people:zzz: Pin
Anonymous5-Feb-03 8:41
Anonymous5-Feb-03 8:41 
GeneralRe: power to the people:zzz: Pin
Anonymous5-Feb-03 17:11
Anonymous5-Feb-03 17:11 
GeneralRe: power to the people:zzz: Pin
Ben Burnett5-Feb-03 18:56
Ben Burnett5-Feb-03 18:56 
Generalnetbios names Pin
orcun colak5-Feb-03 6:10
orcun colak5-Feb-03 6:10 
GeneralRead Foxpro dbf files Pin
pk_fox5-Feb-03 5:52
pk_fox5-Feb-03 5:52 
Hello All,
I have a requirement to read Foxpro dbf files without using ODBC or any other sane methodology, I remember a long time ago I did this in C using a structure but It's so long ago I've forgotten. What I've tried so far is creating a class ( you might gather my C & C++ has gathered dust ) as below but it is not satisfactory ( fields overflowing etc... ). The sample table I've been using has three fields, clm_ref c(10), name c(50) and salary n(15,2),where c(2) is a character field of 2 chars and n(15,2) is a numeric field of 12 digits with precision of 2, here's what I've got so far.

Class Record
{
char filler[1]; */ required for deleted field */
char clm_ref[10];
char name[50];
char salary[15];
void RecordGetData(ifstream &);
};

Record::RecordGetData(ifstream f_in)
{
f_in.read((char*) this,sizeof(*this));
}


int main()
{
Record Claims;
ifstream ifile;
ifile.open("mydata.dbf");
DBF_HEAD dbf_head;
ifile.read((char*) &dbf_head,sizeof(DBF_HEAD)); */ Header info */
ifile.seekg(dbf_head.data_offset,ios::beg); */ seek to data offset*/
Claims.RecordGetData(ifile);

cout << "Claim ref " << Claims.clm_ref << endl;
}

While Claims.clm_ref contains the clm_ref data it also contains part of the name, I'm lost any ideas much appreciated

regards

Pete Kane









Pete Kane

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.