FAQ chr convert from small to captial (C++) [Archive] - C Board

PDA

View Full Version : FAQ chr convert from small to captial (C++)


hlens
11-08-2001, 04:37 PM
how would i convert a small chr at the start of a string into a capital with out converting the rest of the letters after the first into capitals as well ?

thanks newbie

zen
11-08-2001, 05:05 PM
Use toupper() - include cctype and csdtlib -

char a[]="zen";
a[0]=toupper(a[0]);