neillovell
Programmer
Hi
How can I put the values
1 , "Letter"
2 , "Letter(small)"
3 , "Tabloid"
etc. in to a struct? I've been asked to create a lookup table that uses bsearch to find the entry with the matching number, and get the string associated.
So...
int Num = 3
// call bsearch
bsearch(Parameters);
returns "Tabloid"
I can't put the data in to the struct. How do I do this? There will be 41 entries.
How can I put the values
1 , "Letter"
2 , "Letter(small)"
3 , "Tabloid"
etc. in to a struct? I've been asked to create a lookup table that uses bsearch to find the entry with the matching number, and get the string associated.
So...
int Num = 3
// call bsearch
bsearch(Parameters);
returns "Tabloid"
I can't put the data in to the struct. How do I do this? There will be 41 entries.