I am trying to load a structure from a file called "class.dat"
The incoming data is delimited by the pipe | key. The biggest problem is the name field is not a fixed width. Here is a sample of how the data looks in the file.
001635223|Stevens, Bill R.|COSC1400| |004760097|Smith, William O.|COSC1401| |006238033|Smithson, Thelma R.|ITSC1401| |010354130|Woodsen, Richard U.|ITSC1401| |014831430|Adams, Francis H.|COSC1403| |020349068|Adams, John M.|ITSC1401| |023939684|Woodsen, Carla R.|ITSC1403| |
I get the following 2 errors and 1 warning whe trying to run the program.
3a.test.c
d:\3a_test\3a.test.c(92) : error C2223: left of '->_cnt' must point to struct/union
d:\3a_test\3a.test.c(92) : error C2223: left of '->_ptr' must point to struct/union
d:\3a_test\3a.test.c(92) : warning C4133: 'function' : incompatible types - from 'char [51]' to 'struct _iobuf *'
Error executing cl.exe.
3a.test.exe - 2 error(s), 1 warning(s)
Ultimately once the structure is loaded, I will search the structure for a certain class number IE: COSC1401, and send the name, SSN, and reserved space to a report. The code is attached below.
As always,
any help is greatly appreciated,
Alan