[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppTransform
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppTransform
(C++) std::transform
algorithm found in the header file algorithm.Converting a std::string to upper case
From the 'To upper case'-page:int main() { // explicit cast needed to resolve ambiguity std::transform(myString.begin(), myString.end(), myString.begin(), (int(*)(int)) std::toupper); }
- include <algorithm>
- include <cctype> // std::toupper
- include <string>
Code links
- #include
- algorithm (header file)
- cctype (header file)
- include
- int
- main
- string
- string (header file)
- std
- std::transform
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
