Click here to Skip to main content
15,915,501 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionException in ::ShowWindow/WM_SYNCPAINT handler when using WTL rebar Pin
kamrann20-Nov-05 8:53
kamrann20-Nov-05 8:53 
Questionunhandle exception(8000ffff) while acceing ocx methods Pin
Rajesh match18-Nov-05 21:10
Rajesh match18-Nov-05 21:10 
AnswerRe: unhandle exception(8000ffff) while acceing ocx methods Pin
Michael Dunn19-Nov-05 15:18
sitebuilderMichael Dunn19-Nov-05 15:18 
AnswerRe: unhandle exception(8000ffff) while acceing ocx methods Pin
JonEngle6-Dec-05 19:16
JonEngle6-Dec-05 19:16 
QuestionHow to access method of user define control from ATL Pin
rajesh_kapure16-Nov-05 3:54
rajesh_kapure16-Nov-05 3:54 
QuestionUsing ActiveX without container Pin
Ahsan Askare14-Nov-05 23:33
Ahsan Askare14-Nov-05 23:33 
QuestionHow do you know the duplicate key insertion in STL map Pin
sarath_babu13-Nov-05 20:23
sarath_babu13-Nov-05 20:23 
AnswerRe: How do you know the duplicate key insertion in STL map Pin
Jonas Larsson13-Nov-05 21:50
Jonas Larsson13-Nov-05 21:50 
#include < iostream >
#include < map >
using namespace std;

int main()
{
    map < int, int > themap;
    pair < map < int, int > ::iterator, bool > res = themap.insert(pair < int,int > (1,2));
    if (res.second)
        cout << "a value was inserted" << endl;    
    else
        cout << "a value was updated" << endl;    
    res = themap.insert(pair < int,int > (1,3));
    if (res.second)
        cout << "a value was inserted" << endl;    
    else
        cout << "a value was updated" << endl;    

    return 0;
}


If you have to be sure before inserting elements, you'll need to use find before inserting.

---

"Man will never be free until the last king is strangled with the entrails of the last priest". -- Denis Diderot
GeneralRe: How do you know the duplicate key insertion in STL map Pin
sarath_babu14-Nov-05 0:09
sarath_babu14-Nov-05 0:09 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Jonas Larsson14-Nov-05 1:50
Jonas Larsson14-Nov-05 1:50 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Stuart Dootson15-Nov-05 6:53
professionalStuart Dootson15-Nov-05 6:53 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Jörgen Sigvardsson15-Nov-05 9:59
Jörgen Sigvardsson15-Nov-05 9:59 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Stuart Dootson15-Nov-05 19:54
professionalStuart Dootson15-Nov-05 19:54 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Jörgen Sigvardsson15-Nov-05 21:14
Jörgen Sigvardsson15-Nov-05 21:14 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Stuart Dootson15-Nov-05 21:24
professionalStuart Dootson15-Nov-05 21:24 
GeneralRe: How do you know the duplicate key insertion in STL map Pin
Tim Smith23-Nov-05 4:05
Tim Smith23-Nov-05 4:05 
QuestionCommand Line AND a window? Pin
micr0chip12-Nov-05 1:40
micr0chip12-Nov-05 1:40 
AnswerRe: Command Line AND a window? Pin
Michael Dunn13-Nov-05 12:54
sitebuilderMichael Dunn13-Nov-05 12:54 
GeneralRe: Command Line AND a window? Pin
micr0chip15-Nov-05 6:25
micr0chip15-Nov-05 6:25 
Questionupload binary file using webservices Pin
Liu Shuai8-Nov-05 15:58
Liu Shuai8-Nov-05 15:58 
QuestionHow to handle ctrl+c etc in Shell Extension Pin
Solidcore8-Nov-05 0:15
Solidcore8-Nov-05 0:15 
QuestionHow to create a Service using ATL Pin
snprani7-Nov-05 19:02
snprani7-Nov-05 19:02 
AnswerRe: How to create a Service using ATL Pin
G Haranadh7-Nov-05 19:49
G Haranadh7-Nov-05 19:49 
QuestionActivex Versioning Pin
omaycotte7-Nov-05 10:17
omaycotte7-Nov-05 10:17 
Questionadd page in property sheet Pin
Maddie from Dartford6-Nov-05 19:23
Maddie from Dartford6-Nov-05 19:23 

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.