M
Mike Copeland
I have the following data structure that is currently processed by an
STL map.
Although it currently works for most storage and retrieval, I have
need to process the data in different orders than the map key (teamName,
teamTypeCode). Knowing that I can't "resort" the data in an STL map, is
there another STL structure that I could use to store, sort, retrieve
and process the data defined in this structure? TIA
(Please don't criticize my naming conventions - I'm old and I prefer
this nomenclature...)
struct TEAMMAPTYPE
{ // Team Ids, Names
string teamCode; // Team Code (map key)
string teamName; // Team's Name
bool isAdded; // Added flag
char teamTypeCode; // Team type Code
int teamMembers1; // Count of Team Members-1
int teamMembers2; // Count of Team Members-2
} extern teamWork; // storage for Team info
typedef map<string, TEAMMAPTYPE> TEAMS;
TEAMS teamMap;
map<string, TEAMMAPTYPE>::iterator teamIt;
STL map.
Although it currently works for most storage and retrieval, I have
need to process the data in different orders than the map key (teamName,
teamTypeCode). Knowing that I can't "resort" the data in an STL map, is
there another STL structure that I could use to store, sort, retrieve
and process the data defined in this structure? TIA
(Please don't criticize my naming conventions - I'm old and I prefer
this nomenclature...)
struct TEAMMAPTYPE
{ // Team Ids, Names
string teamCode; // Team Code (map key)
string teamName; // Team's Name
bool isAdded; // Added flag
char teamTypeCode; // Team type Code
int teamMembers1; // Count of Team Members-1
int teamMembers2; // Count of Team Members-2
} extern teamWork; // storage for Team info
typedef map<string, TEAMMAPTYPE> TEAMS;
TEAMS teamMap;
map<string, TEAMMAPTYPE>::iterator teamIt;