Click here to Skip to main content
16,005,169 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncd rom cache? Pin
particle2k23-Aug-02 8:37
particle2k23-Aug-02 8:37 
Generaldestructor question Pin
ns23-Aug-02 8:39
ns23-Aug-02 8:39 
GeneralRe: destructor question Pin
Navin23-Aug-02 8:58
Navin23-Aug-02 8:58 
GeneralRe: destructor question Pin
Paul M Watt23-Aug-02 9:02
mentorPaul M Watt23-Aug-02 9:02 
GeneralRe: destructor question Pin
ns23-Aug-02 9:10
ns23-Aug-02 9:10 
GeneralRe: destructor question Pin
John Fisher23-Aug-02 9:07
John Fisher23-Aug-02 9:07 
GeneralRe: destructor question Pin
ns23-Aug-02 9:14
ns23-Aug-02 9:14 
GeneralSTL set iterator - simple question Pin
ns23-Aug-02 8:11
ns23-Aug-02 8:11 
I created a set by inserting values into it <cstring>

Then I try to find if a new incoming one is already there:

NamesSet::iterator it;

it = namesSet.find(NewName);


If I find it , I want to do something, if not, another thing. To detect it

MSDN says:
const_iterator find(const Key& key) const;<br />
The member function returns an iterator that designates the earliest element in the controlled sequence whose sort key equals key. If no such element exists, the iterator equals end().<br />



So would my test be:

if(it != namesSet.end())
{
}
else
{
}

Thanks,
ns
GeneralRe: STL set iterator - simple question Pin
Stuart Dootson23-Aug-02 8:26
professionalStuart Dootson23-Aug-02 8:26 
GeneralRe: STL set iterator -very cool! Pin
ns23-Aug-02 8:43
ns23-Aug-02 8:43 
GeneralRichEdit Question Pin
Nick Parker23-Aug-02 6:59
protectorNick Parker23-Aug-02 6:59 
GeneralRe: RichEdit Question Pin
Chris Losinger23-Aug-02 7:11
professionalChris Losinger23-Aug-02 7:11 
GeneralRe: RichEdit Question Pin
Nick Parker23-Aug-02 7:28
protectorNick Parker23-Aug-02 7:28 
GeneralRe: RichEdit Question Pin
Chris Losinger23-Aug-02 7:39
professionalChris Losinger23-Aug-02 7:39 
GeneralRe: RichEdit Question Pin
Nick Parker23-Aug-02 8:12
protectorNick Parker23-Aug-02 8:12 
GeneralSetting a wait cursor on a dialog using pure Win32 Pin
Todd Jeffreys23-Aug-02 6:46
Todd Jeffreys23-Aug-02 6:46 
GeneralRe: Setting a wait cursor on a dialog using pure Win32 Pin
Tomasz Sowinski23-Aug-02 6:54
Tomasz Sowinski23-Aug-02 6:54 
GeneralRe: Setting a wait cursor on a dialog using pure Win32 Pin
Todd Jeffreys23-Aug-02 7:12
Todd Jeffreys23-Aug-02 7:12 
GeneralRe: Setting a wait cursor on a dialog using pure Win32 Pin
Tomasz Sowinski23-Aug-02 7:18
Tomasz Sowinski23-Aug-02 7:18 
GeneralRe: Setting a wait cursor on a dialog using pure Win32 Pin
Todd Jeffreys23-Aug-02 7:40
Todd Jeffreys23-Aug-02 7:40 
GeneralRe: Setting a wait cursor on a dialog using pure Win32 Pin
Tomasz Sowinski23-Aug-02 7:44
Tomasz Sowinski23-Aug-02 7:44 
Generalchanges in database -- Pin
ns23-Aug-02 6:04
ns23-Aug-02 6:04 
GeneralRe: changes in database -- Pin
Mauricio Ritter23-Aug-02 7:29
Mauricio Ritter23-Aug-02 7:29 
GeneralBooks.. Books.. Books... Pin
Ryan B.23-Aug-02 5:58
Ryan B.23-Aug-02 5:58 
GeneralRe: Books.. Books.. Books... Pin
valikac23-Aug-02 6:40
valikac23-Aug-02 6:40 

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.