I'm in trouble here... I need to get this program working to proceed with my application.
The program is very complex, it works fine on a 10 year old system written in IBM C/2. I am showing only what I think yu may need here, please let me know if you need anything else. I am converting it to VS 7.1 (C not C++). All my source is named .C.
No compile errors, but it throws an exception at runtime. Here is the structure and the code trying to write a pointer into it. (all defined as ptrs).
Just can't seem to get a handle on why it worked in the old environment but fails now.
Expand|Select|Wrap|Line Numbers
- // Struct
- typedef struct line
- {
- UCHAR *index, // pointer to product ( in valid.file )
- lineNum, // line # of the family
- famCount; // number of family members
- }
- LINE;
- typedef struct win
- {
- UCHAR *firstRecord, // first record in file
- *lastRecord, // last record in file
- *currentRecord; // pointer to current record
- LINE list[FAM_MAX + 1], // product family info
- *currentFamily, // pointer to current ( new ) family info
- *lastFamily, // pointer to last ( previous ) family info
- *defaultFamily, // default product family pointer
- *prepriceFamily; // default preprice family pointer
- UCHAR *ppfirstRecord, // first record in pre-price validation file
- *pplastRecord, // last record in pre-price validation file
- *ppcurrentRecord; // pointer to current record in validation file
- }
- WINDOW;
- // Code to write a pointer ( I verified it is a good pointer vale) to the struct.
- window->currentFamily->index = filePtr;
Lee