Thread: upper case...

  1. #1

    upper case...

    ok this is why i asked bout the whole copying file stuff.. this is what i am tryin to do... i want to make a program that asks the user for their name like... john sammy smith... and what i want the program to do is check the first letter of the first middle and last name and if its not capatilized, then make it capitalized. im tryin to get this accomplished with the stuff i know, so all i really want to do is save the name to a file then check the data and write the new data over the existing information and cout the result. thx for everyones help.

  2. #2
    Registered User
    Join Date
    Mar 2002
    the name will need to be one or multiple character arrays/strings

    include ctype.h to use toupper(ch)
    toupper(ch) takes a single character as it's argument and returns the uppercase character. If the character is not a letter or it is already uppercase, it does not change it and returns the same character that was sent. tolower(ch) is the compiment of toupper(ch)


    char ch = 'a';
    ch = toupper(ch);

    *ch is now 'A'*

  3. #3

    Unhappy lost me

    ok like i said.. i just learned bout the whole "opening closeing, file" stuff tonight... and im tryin to do it by saving the information in a file that the program makes, then opens the file and edits the characters to make the first letters uppercase. is there a way to do this by using char's and useing like ifstream and stuff on that lines? thx everyone.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Format Precision & Scale
    By mattnewtoc in forum C Programming
    Replies: 1
    Last Post: 09-16-2008, 10:34 AM
  2. get keyboard and mouse events
    By ratte in forum Linux Programming
    Replies: 10
    Last Post: 11-17-2007, 05:42 PM
  3. Intel syntax on MinGW ?
    By TmX in forum Tech Board
    Replies: 2
    Last Post: 01-06-2007, 09:44 AM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. returning to a spot in the code
    By Shadow in forum C Programming
    Replies: 4
    Last Post: 09-22-2001, 05:24 AM