3

im not really good in c++ so i wondering if someone can help me with this.

                    std::vector<std::string> vocations;
                for(VocationsMap::iterator it = Vocations::getInstance()->getFirstVocation(); it != Vocations::getInstance()->getLastVocation(); ++it)
                {
                    if(it->first == it->second->getFromVocation() && it->first != 0)
                        vocations.push_back(it->second->getName());
                }

                msg << "What would you like to be... ";
                for(std::vector<std::string>::const_iterator it = vocations.begin(); it != vocations.end(); ++it)
                {
                    if(it == vocations.begin())
                        msg << "{" << *it << "}";
                    else if(*it == *(vocations.rbegin()))
                        msg << " or {" << *it << "}.";
                    else
                        msg << ", {" << *it << "}";
                }
            }

I want to make (*it) in lowercase

amdixon
  • 3,814
  • 8
  • 25
  • 34
dohdle
  • 93
  • 7
  • 3
    See [How to convert std::string to lower case?](http://stackoverflow.com/questions/313970/how-to-convert-stdstring-to-lower-case) – melak47 Nov 09 '15 at 09:23
  • 1
    A decent first question for a new user, +1 – musefan Nov 09 '15 at 09:24
  • 1
    If u wanted to print a `string` in `lower case` then why did the whole code which has nothing to do with lowering of case – Ankit Acharya Nov 09 '15 at 09:37
  • It's just a part of the code from a game online. I don't want to print i want to inject it in a client. Ankit~ – dohdle Nov 09 '15 at 10:03

0 Answers0