Thread: FAQ chr convert from small to captial (C++)

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    3

    Question chr convert from small to captial

    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
    Last edited by hlens; 11-08-2001 at 05:01 PM.

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Use toupper() - include cctype and csdtlib -

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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Wiki FAQ
    By dwks in forum A Brief History of Cprogramming.com
    Replies: 192
    Last Post: 04-29-2008, 01:17 PM
  2. Replies: 2
    Last Post: 09-20-2006, 05:40 PM
  3. FAQ Check/Lock
    By RoD in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-15-2002, 11:21 AM
  4. FAQ how do i convert a string to an integer?? (C)
    By Unregistered in forum FAQ Board
    Replies: 1
    Last Post: 12-02-2001, 05:03 PM