Click here to Skip to main content
14,690,249 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
Questionstd::map and error checking Pin
bkelly139-Jun-13 11:42
Memberbkelly139-Jun-13 11:42 
AnswerRe: std::map and error checking Pin
Garth J Lancaster9-Jun-13 14:18
professionalGarth J Lancaster9-Jun-13 14:18 
GeneralRe: std::map and error checking Pin
bkelly139-Jun-13 15:16
Memberbkelly139-Jun-13 15:16 
AnswerRe: std::map and error checking Pin
Richard MacCutchan9-Jun-13 22:23
mveRichard MacCutchan9-Jun-13 22:23 
AnswerRe: std::map and error checking Pin
MicroVirus11-Jun-13 13:07
MemberMicroVirus11-Jun-13 13:07 
Questionstatus display in a dialog Pin
bkelly139-Jun-13 6:17
Memberbkelly139-Jun-13 6:17 
AnswerRe: status display in a dialog Pin
Garth J Lancaster9-Jun-13 15:53
professionalGarth J Lancaster9-Jun-13 15:53 
Questionstd::map, fundamental get started problem RESOLVED Pin
bkelly139-Jun-13 5:04
Memberbkelly139-Jun-13 5:04 
Windows 7, Visual Studio 2008, MFC, CPP, std::map
I am trying to get an std::map working. I have tried several permutations and patterned it after some tutorials found with a search. Still I am unable to get it right and to decipher the error message.
Please assist with this problem.
The setup
typedef struct
{
   unsigned int   identifier_location;
   unsigned int   count_found;
   CString        key;
   CString        token[ MAX_TOKEN_COUNT ];
}     td_tmats_attributes_definitions;

td_tmats_attributes_definitions    m_one_definition_record;

std::map < CString, td_tmats_attributes_definitions > m_tmats_definition_map;
//          ^ the key    ^the data to store
// below is an alternate declaration.
std::map < string, td_tmats_attributes_definitions > m_tmats_definition_map_string;


And now the code

CString  the_key;
…
The code:
// The primary insertion code
 m_tmats_definition_map.insert( the_key, m_one_definition_record );
// the alternate
string str_key = the_key;
//            m_tmats_definition_map_string.insert( the_key, m_one_definition_record );


Neither of the two options will compile.

I was prepared to post the error message, but I have a strong suspicion that reader will know my error with little effort and the long text from VS output box will only clutter things up. Let me know if you want to see the error text.

Please tell me what I need to change.
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/


modified 9-Jun-13 12:44pm.

AnswerRe: std::map, fundamental get started problem Pin
xenotron9-Jun-13 5:19
Memberxenotron9-Jun-13 5:19 
GeneralRe: std::map, fundamental get started problem RESOLVED Pin
bkelly139-Jun-13 5:46
Memberbkelly139-Jun-13 5:46 
QuestionCFileException, discover reasons RESOLVED Pin
bkelly138-Jun-13 11:05
Memberbkelly138-Jun-13 11:05 
AnswerRe: CFileException, discover reasons Pin
Richard MacCutchan8-Jun-13 22:40
mveRichard MacCutchan8-Jun-13 22:40 
GeneralRe: CFileException, discover reasons RESOLVED Pin
bkelly139-Jun-13 4:54
Memberbkelly139-Jun-13 4:54 
GeneralRe: CFileException, discover reasons Pin
bkelly139-Jun-13 7:11
Memberbkelly139-Jun-13 7:11 
GeneralRe: CFileException, discover reasons Pin
Richard MacCutchan9-Jun-13 10:23
mveRichard MacCutchan9-Jun-13 10:23 
GeneralRe: CFileException, discover reasons Pin
bkelly139-Jun-13 10:43
Memberbkelly139-Jun-13 10:43 
GeneralRe: CFileException, discover reasons Pin
Richard MacCutchan9-Jun-13 21:41
mveRichard MacCutchan9-Jun-13 21:41 
Answertried FormatMessage() Pin
bkelly139-Jun-13 8:07
Memberbkelly139-Jun-13 8:07 
AnswerStill looking for reason text Pin
bkelly1322-Jun-13 13:17
Memberbkelly1322-Jun-13 13:17 
GeneralRe: Still looking for reason text Pin
Richard MacCutchan23-Jun-13 1:51
mveRichard MacCutchan23-Jun-13 1:51 
GeneralRe: Still looking for reason text Pin
bkelly134-Jul-13 12:05
Memberbkelly134-Jul-13 12:05 
GeneralRe: Still looking for reason text Pin
Richard MacCutchan4-Jul-13 21:50
mveRichard MacCutchan4-Jul-13 21:50 
QuestionHow to force C++ allocate memory from disk? Pin
Falconapollo8-Jun-13 0:49
MemberFalconapollo8-Jun-13 0:49 
AnswerRe: How to force C++ allocate memory from disk? Pin
MicroVirus11-Jun-13 1:13
MemberMicroVirus11-Jun-13 1:13 
GeneralRe: How to force C++ allocate memory from disk? Pin
Falconapollo11-Jun-13 1:19
MemberFalconapollo11-Jun-13 1:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.