Hi all,
I run into a problem. Please help me out.
I read in a file contains char and int, for example, my data file is
tomato 2 3
potato 4 5
ketchup 6 7
now, after I read the file in, I need to store this data into a structure,
struct mystruct
{
int ID;
int time;
int count;
};
while tomato, potato, ketchup are stored in ID;
2,4,6 are stored in time
3,5,7 are stored in count
My problem is how to convert tomato, potato, and ketchup into type int of int ID. Any help would be appreciated.