Thread: More help on pointer to function in map

  1. #16
    Registered User
    Join Date
    Jul 2003
    Posts
    450
    I figured it out!
    Code:
    vector<string*> & BeverageUserInterface::ParseMessage(vector<string*>& MessageIn)
    {
       vector<string *>::iterator CommandPos;
       BeverageDriverMap::iterator CommandLookUp;
       pFunction tempFunction;
       for (CommandPos = MessageIn.begin(); CommandPos != MessageIn.end(); ++CommandPos)
       {
       	   CommandLookUp = BeverageDriverTable.find(*CommandPos);	           
               
    	   if (CommandLookUp != BeverageDriverTable.end())
    	   {
    	       (*this.*CommandLookUp->second)();
    	              
    	   } 
       }
       return MessageOut;
    }

  2. #17
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Congrats

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Compiler "Warnings"
    By Jeremy G in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 04-24-2005, 01:09 PM