phidelt1354
Technical User
How do you add a hash table to this structure?
struct header =>
{
customer => '$',
type => '$',
shares => '$'
};
I need to add a hash table to the header struct to hold a map of friend_type->friend_name. The friend_type string will represent the different friends in the flat.dat file that it will be reading from.
PAVANSYMBOL
LICURSISYMBOL
BASSISYMBOL
So for the example line below:
CUSTOMER|TYPE|SHARES|PAVANSYMBOL|LICUR...
PAVAN|F|100|COOL|MAN|GUY
The string "PAVANSYMBOL" will map to COOL, "LICURSISYMBOL" will map to MAN, etc.
I need help with the syntax of the structure and setting it up. The data will be read from a flat file.
Thanks!
struct header =>
{
customer => '$',
type => '$',
shares => '$'
};
I need to add a hash table to the header struct to hold a map of friend_type->friend_name. The friend_type string will represent the different friends in the flat.dat file that it will be reading from.
PAVANSYMBOL
LICURSISYMBOL
BASSISYMBOL
So for the example line below:
CUSTOMER|TYPE|SHARES|PAVANSYMBOL|LICUR...
PAVAN|F|100|COOL|MAN|GUY
The string "PAVANSYMBOL" will map to COOL, "LICURSISYMBOL" will map to MAN, etc.
I need help with the syntax of the structure and setting it up. The data will be read from a flat file.
Thanks!