ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/StringUtils.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/utils/StringUtils.hpp (file contents):
Revision 1962 by tim, Tue Feb 1 22:49:23 2005 UTC vs.
Revision 1980 by tim, Mon Feb 7 19:13:43 2005 UTC

# Line 122 | Line 122 | namespace oopse {
122      template<typename T>
123      T lexi_cast(const std::string& str) {
124          T result;
125 <        std::istringstream iss;        
126 <        if (iss >> result) {
125 >        std::istringstream iss(str);        
126 >        if (!(iss >> result)) {
127              std::cerr << "lexi_cast Error" << std::endl;
128          }
129          return result;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines