Link to home
Start Free TrialLog in
Avatar of cameron423
cameron423

asked on

what will atoi(m_mapVideoConfig["root.Image.NbrOfConfigs"].c_str()) do if key does not exist?

What the following C++ function, which will be used with 64 bit Microsoft Visual Studio 2008 and Ubuntu Linux, return?

     uint32_t Camera::GetChannelCount()
    {
         return  atoi(m_mapVideoConfig["root.Image.NbrOfConfigs"].c_str());

    }
   
   where m_mapVideoConfig is std:map<std::string,std::string>

   * if the key "root.Image.NbrOfConfigs" does not exist

  will it throw an exception or crash?

   Thank you.
SOLUTION
Avatar of sarabande
sarabande
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial