Google
 
Webcprogramming.com




An Affiliate of AIHorizon




toupper()

Prototype: int toupper(int aChar);
Header File: ctype.h (C) or cctype (C++)
Explanation: toupper accepts a character as an argument (it actually accepts an integer, but the two are interchangeable) and will convert it to uppercase, and will return the uppercase character, in the form of an ASCII integer, and leave the parameter unchanged.



Example:
//Program creates char d, sets it equal to lowercase letter
//Converts it to uppercase and outputs it
#include <cctype>
#include <iostream>

using namespace std;

int main()
{
    char d='a';  
    d=toupper(d);
    cout<<d;
}
Other Functions

-----
Interested in advertising with us?
Please read our privacy policy.
Copyright © 1997-2005 Cprogramming.com. All rights reserved.

Geodesy Designs