Structures, Arrays, Sums...
I was wondering if any one could help, point me in the right direction or offer any advice with my problem. The position within the file of the record is decided by this algorithm
result = data->vehicle_reg[0] - 'A';
/*First letter of the registration minus the int value of A */
position = (result *1000)+ data->vehicle_reg[1,2,3];
/*Result of first part mutiplied by 1000 and with the first
three digits of the registration added*/
So, for example
A122FFF would lead to the result of: 122
Data is a pointer to a structure, (I think) it's declared as below:-
struct car
{
vehicle_reg
etc.
} data;