   std::find
  Hi all,When i use std::find, i get the error:error C2039: ''find'' : is not a member of ''std''.i''m using vs6.0.thx in advance
  Shouldn''t you be using something like std::map::find or std::set::find?find is a member function of these (and other) STL templates. ;  I would guess that you are messing up with namespaces. Your code should look like one of these: 1. #include <algorithm> std::find(...); 2. #include <algorithm> using std::find; find(...); 3. #include <algorithm> using namespace std; find(...); [ Google || Start Here || ACCU || STL || Boost || MSDN || GotW || MSVC++ Library Fixes || BarrysWorld || E-Mail Me ]    ;  thx dudes ;quote:Original post by Strewth   Shouldn't you be using something like std::map::find or std::set::find?find is a member function of these (and other) STL templates.   Indeed, std::map has an overloaded find() public member function. Freaker13  , though, is talking about std::find(), which is one of the [search/non-mutating] generic algorithms (a set of independent functions). For example: #include <vector>#include <algorithm>#include <string>#include <iostream> ... std::vector<std::string> V(..., ...); std::sort( V.begin(), V.end() );    // generic algorithm `sort' // (yes, could, and probably would, be put in if statement)std::vector<int>::iterator found = std::find( V.begin(), V.end(), "word" );  // generic algorithm `found'if ( found != V.end() )    std::cout << "found" << std::endl;else    std::cout << "not found" << std::endl; std::rotate( V.begin(), V.begin() + V.size() / 2, V.end() ); // generic algorithm `rotate' std::reverse( V.begin(), V.end() );   // generic algorithm `reverse' ... etc., etc. [ Google || Start Here || ACCU || STL || Boost || MSDN || GotW || MSVC++ Library Fixes || BarrysWorld || E-Mail Me ] [edited by - Lektrix on August 16, 2003 8:34:59 AM];  Learn something new every day, thanks 