Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~472 People Reached
Favorite Forums
Favorite Tags
c++ x 2
Member Avatar for drjay1627

I need help with inserting a string for both key and value to a map. [code] while(!myHuffFile.eof()){ string word, code; int freq; myHuffFile >> word >> freq >> code; if(word == ""){ break; }else{ _fileMap.insert(pair<string,string>(word,code)); _freqMap.insert(pair<string,int>(word,freq)); } } [/code] error: error: conversion from `std::_Rb_tree_iterator<std::pair<const std::string, std::string> >' to non-scalar type …

Member Avatar for drjay1627
0
333
Member Avatar for SKP

I am using map <string, string> to create a map. Inserting and finding operations work fine on solaris, aix but core is generated on hpux. The error shown in core debug as follows: insert__7rb_treeXT12basic_stringXTcT18string_char_traitsXTc_T9allocator_T4pairXTC12basic_stringXTcT18string_char_traitsXTc_T9allocator_T12basic_stringXTcT18string_char_traitsXTc_T9allocator__T9select1stXT4pairXTC12basic_stringXTcT18string_char_traitsXTc_T9allocator_T12basic_stringXTcT18string_char_traitsXTc_T9allocator__T12basic_stringXTcT18string_char_traitsXTc_T9allocator__T4lessXT12basic_stringXTcT18string_char_traitsXTc_T9allocator__T9allocator_FRC4pairXTC12basic_stringXTcT18string_char_traitsXTc_T9allocator_T12basic_stringXTcT18string_char_traitsXTc_T9allocator__ () Has anyone faced the same issue and has got the fix for it??? Please share …

Member Avatar for Salem
0
139