Hey there!
I have a slight problem with C++. I looked through the boards and tutorials here, but wasn't able to find a solution... so here goes..
I need to read in from a part of a file, which looks somewhat like this
1
A F3 10 F2 5 F4 6
B F1 15 F5 12 F6 9
C F1 10
2
D F1 10
E F1 10
F F1 10
where 1 is a representation of the first minute, and A, B, and C are customers in a queue. 2 is the next minute.
I've been trying to store the information in an array like this.
data[minute][customer][F*][number]
so for the first minute:
data[1]['A'][3][10]
data[1]['A'][2][5]
data[1]['A'][4][6]
however, I have been unable to find a method of reading in each minute individually, as I dont have a check condtion to figure out if the variable i'm reading in is an integer or a character.
now that thats over.... the question...
Is there any way to determine if input is an integer or character? or is there a more efficient way of storing these minutes?
Thanks in advance
Abhinay