Click here to Skip to main content
15,921,169 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalmethod executing too many times Pin
mgriffith24-Jul-02 8:08
mgriffith24-Jul-02 8:08 
GeneralFonts Pin
Anonymous24-Jul-02 8:06
Anonymous24-Jul-02 8:06 
Questionerror LNK2001?? Pin
Jh324-Jul-02 7:11
Jh324-Jul-02 7:11 
AnswerRe: error LNK2001?? Pin
Le centriste24-Jul-02 8:03
Le centriste24-Jul-02 8:03 
Generalfind in vector !!! Pin
Hadi Rezaee24-Jul-02 6:31
Hadi Rezaee24-Jul-02 6:31 
GeneralRe: find in vector !!! Pin
Joaquín M López Muñoz24-Jul-02 6:35
Joaquín M López Muñoz24-Jul-02 6:35 
GeneralRe: find in vector !!! Pin
Hadi Rezaee24-Jul-02 7:09
Hadi Rezaee24-Jul-02 7:09 
GeneralRe: find in vector !!! Pin
Phil Boyd24-Jul-02 8:32
Phil Boyd24-Jul-02 8:32 
std::find returns an iterator pointing to the position within the vector where the value was found. If the value is not found, end() is returned. Use std::distance in <iterator> to easily determine the location within the vector.

// warning untested code
std::vector<type>::const_iterator it = std::find(v.begin(), v.end(), value);
if (it != v.end())
{
std::vector<type>::differenc_type loc = std::distance(v.begin(), it);
}

Phil Boyd
MCP
CPT, AR

You may be gone, but we will never forget your sacrifice.

"Proud to be an American..." Lee Greenwood
Generala few questions Pin
NickOne24-Jul-02 6:27
NickOne24-Jul-02 6:27 
GeneralRe: a few questions Pin
Christian Graus24-Jul-02 12:35
protectorChristian Graus24-Jul-02 12:35 
GeneralPrinting a Report Via Microsoft Word Pin
SanShou24-Jul-02 5:59
SanShou24-Jul-02 5:59 
QuestionMultiple Inheritance? Pin
Peter Liddle24-Jul-02 5:58
Peter Liddle24-Jul-02 5:58 
AnswerRe: Multiple Inheritance? Pin
Tomasz Sowinski24-Jul-02 6:28
Tomasz Sowinski24-Jul-02 6:28 
GeneralRe: Multiple Inheritance? Pin
Philippe Mori24-Jul-02 7:55
Philippe Mori24-Jul-02 7:55 
AnswerRe: Multiple Inheritance? Pin
Joaquín M López Muñoz24-Jul-02 6:59
Joaquín M López Muñoz24-Jul-02 6:59 
Generalnewbie question about strcpy and pointers Pin
ns24-Jul-02 5:47
ns24-Jul-02 5:47 
GeneralRe: newbie question about strcpy and pointers Pin
Peter Liddle24-Jul-02 6:00
Peter Liddle24-Jul-02 6:00 
GeneralRe: newbie question about strcpy and pointers Pin
Chris Losinger24-Jul-02 6:01
professionalChris Losinger24-Jul-02 6:01 
GeneralRe: newbie question about strcpy and pointers Pin
ns24-Jul-02 6:26
ns24-Jul-02 6:26 
GeneralRe: newbie question about strcpy and pointers Pin
Ravi Bhavnani24-Jul-02 6:56
professionalRavi Bhavnani24-Jul-02 6:56 
GeneralRe: newbie question about strcpy and pointers Pin
SanShou24-Jul-02 6:35
SanShou24-Jul-02 6:35 
GeneralRe: newbie question about strcpy and pointers Pin
Philippe Mori24-Jul-02 8:03
Philippe Mori24-Jul-02 8:03 
GeneralTROLL QUESTION Pin
troll-124-Jul-02 5:32
susstroll-124-Jul-02 5:32 
GeneralRe: TROLL QUESTION Pin
Tomasz Sowinski24-Jul-02 5:46
Tomasz Sowinski24-Jul-02 5:46 
GeneralDialog Bar Docking Pin
BishGada24-Jul-02 5:30
BishGada24-Jul-02 5:30 

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.