M
Mike Copeland
I have the following structure:
#define TLIMIT 5
typedef struct EntTimes
{
int bibNumber;
short numST, nunFT;
long startLine[TLIMIT];
long finishLine[TLIMIT];
string entName;
} eTWork;
eTWork eData;
typedef map<int, EntTimes> ETIMES;
ETIMES etr;
map<int, EntTimes>::iterator eTIter;
in which I wish to store ordered values in the "startLine" and
"finishLine" arrays. Specifically, I want to populate the "startLine"
array with values that are high-to-low and to populate the "finishLine"
array with values that are low-to-high. In all cases I will have one-
to-n values to be stored (but "n" may exceed the array limit).
I've tried to manually code something, but it's horribly convoluted
(and no doubt buggy). I suspect there's an STL function (queue?,
deque?) that may help me, but I can't seem to make sense of available
options. Please advise. TIA
#define TLIMIT 5
typedef struct EntTimes
{
int bibNumber;
short numST, nunFT;
long startLine[TLIMIT];
long finishLine[TLIMIT];
string entName;
} eTWork;
eTWork eData;
typedef map<int, EntTimes> ETIMES;
ETIMES etr;
map<int, EntTimes>::iterator eTIter;
in which I wish to store ordered values in the "startLine" and
"finishLine" arrays. Specifically, I want to populate the "startLine"
array with values that are high-to-low and to populate the "finishLine"
array with values that are low-to-high. In all cases I will have one-
to-n values to be stored (but "n" may exceed the array limit).
I've tried to manually code something, but it's horribly convoluted
(and no doubt buggy). I suspect there's an STL function (queue?,
deque?) that may help me, but I can't seem to make sense of available
options. Please advise. TIA