Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CFile output - Problem - An extra White space Pin
Sarath C10-Mar-09 3:15
Sarath C10-Mar-09 3:15 
AnswerRe: CFile output - Problem - An extra White space Pin
David Crow10-Mar-09 3:43
David Crow10-Mar-09 3:43 
QuestionDatabase with password Pin
Grebeshkova10-Mar-09 1:56
Grebeshkova10-Mar-09 1:56 
QuestionRe: Database with password Pin
David Crow10-Mar-09 3:45
David Crow10-Mar-09 3:45 
Questionmap in mfc Pin
hrishiS10-Mar-09 1:41
hrishiS10-Mar-09 1:41 
AnswerRe: map in mfc Pin
Iain Clarke, Warrior Programmer10-Mar-09 1:47
Iain Clarke, Warrior Programmer10-Mar-09 1:47 
AnswerRe: map in mfc Pin
Nishad S10-Mar-09 2:38
Nishad S10-Mar-09 2:38 
AnswerRe: map in mfc Pin
CPallini10-Mar-09 3:01
mveCPallini10-Mar-09 3:01 
As suggest by Iain, you may use a struct, for instance, assuming id unique (see, for instance, [^]):
#include <map>
using namespace std;
struct MyData
{
  string _name;
  int _regNo;
  MyData(string name, int regNo): _name(name), _regNo(regNo){}
};

void main()
{
  map <int, MyData> mymap;
  mymap.insert(pair <int, MyData>(1, MyData("foo", 10)));
}



BTW MFC hai is own CMap container, but keep away from it!

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: map in mfc Pin
Eytukan10-Mar-09 6:46
Eytukan10-Mar-09 6:46 
AnswerRe: map in mfc Pin
Stephen Hewitt10-Mar-09 3:06
Stephen Hewitt10-Mar-09 3:06 
AnswerRe: map in mfc Pin
Eytukan10-Mar-09 6:50
Eytukan10-Mar-09 6:50 
QuestionDifferent encoding?? Pin
gothic_coder10-Mar-09 1:03
gothic_coder10-Mar-09 1:03 
AnswerRe: Different encoding?? Pin
Iain Clarke, Warrior Programmer10-Mar-09 1:43
Iain Clarke, Warrior Programmer10-Mar-09 1:43 
AnswerRe: Different encoding?? Pin
gothic_coder10-Mar-09 1:45
gothic_coder10-Mar-09 1:45 
GeneralRe: Different encoding?? Pin
Iain Clarke, Warrior Programmer10-Mar-09 2:14
Iain Clarke, Warrior Programmer10-Mar-09 2:14 
GeneralRe: Different encoding?? Pin
CPallini10-Mar-09 3:55
mveCPallini10-Mar-09 3:55 
QuestionWhile creating thread error C2665: 'AfxBeginThread' Pin
Abhijit D. Babar10-Mar-09 0:45
Abhijit D. Babar10-Mar-09 0:45 
AnswerRe: While creating thread error C2665: 'AfxBeginThread' Pin
Jijo.Raj10-Mar-09 0:52
Jijo.Raj10-Mar-09 0:52 
AnswerRe: While creating thread error C2665: 'AfxBeginThread' Pin
Cedric Moonen10-Mar-09 0:53
Cedric Moonen10-Mar-09 0:53 
QuestionGet the keys present in the section of an ini file... Pin
siva45510-Mar-09 0:24
siva45510-Mar-09 0:24 
AnswerRe: Get the keys present in the section of an ini file... Pin
Paresh Chitte10-Mar-09 0:44
Paresh Chitte10-Mar-09 0:44 
AnswerRe: Get the keys present in the section of an ini file... Pin
Iain Clarke, Warrior Programmer10-Mar-09 0:46
Iain Clarke, Warrior Programmer10-Mar-09 0:46 
AnswerRe: Get the keys present in the section of an ini file... - REPOST Pin
Iain Clarke, Warrior Programmer10-Mar-09 1:00
Iain Clarke, Warrior Programmer10-Mar-09 1:00 
GeneralRe: Get the keys present in the section of an ini file... - REPOST Pin
siva45510-Mar-09 1:34
siva45510-Mar-09 1:34 
GeneralRe: Get the keys present in the section of an ini file... - REPOST Pin
Iain Clarke, Warrior Programmer10-Mar-09 1:38
Iain Clarke, Warrior Programmer10-Mar-09 1:38 

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.