View Single Post
Old May 9th, 2006, 8:38 PM   #2
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 873
Rep Power: 4 The Dark is on a distinguished road
Looks good. A few points:
- it is indent, not ident
- The stripstring could use the substr and find_first_not_of string methods, instead of appending the chars back one by one.
std::string stripString(std::string target)
{	
    string temp;
    int i = target.find_first_not_of(" \t");
    if (i != npos)
      temp = target.substr(i);
    return temp;
}
- incString=(incString?false:true); can be written as incString=!incString;
- In VS you can use Edit->Advanced->Format Selection to reformat, and use the options to Tools->Options->(i forget) to change the editor to use spaces instead of tabs.
The Dark is offline   Reply With Quote