This shows you the differences between two versions of the page.
cpp:cctype:toupper [2012/10/12 15:18] |
cpp:cctype:toupper [2024/02/16 01:04] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{keywords>wiki library source code example reference}} | ||
+ | ===== toupper ====== | ||
+ | <code cpp> | ||
+ | #include <cctype> | ||
+ | int toupper( int char ); | ||
+ | </code> | ||
+ | Returns upper case type of the character | ||
+ | ===== cpp Sourcecode Example ===== | ||
+ | <code cpp> | ||
+ | #include <iostream> /* including standard library */ | ||
+ | #include <cctype> | ||
+ | |||
+ | using namespace std; | ||
+ | int main ( void ) | ||
+ | { | ||
+ | /* convert the Chars "i" and "t" uppercase */ | ||
+ | cout << static_cast<char>(toupper('i')) << " whant " << static_cast<char>(toupper('t')) << "his in uppercase" << endl; | ||
+ | |||
+ | return 0; | ||
+ | } | ||
+ | </code> | ||
+ | ==== output ==== | ||
+ | output: | ||
+ | I whant This in uppercase |