Thread: in need of urgent HELP!!!!!!!!!

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    1

    Exclamation in need of urgent HELP!!!!!!!!!

    can somebody help me create this program?
    "create a program that would accept a string from the user and convert all small letters to capital and vice versa, using arrays and pointers"

    i already started the program but I cant finish it please help me!
    #include<oistream.h>
    #include<string.h>

    void main()
    {
    char word[256]="";

    cout<<"Please enter a word/Phrase";
    cin>>word;
    strupper (word);
    }

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    Use toupper in <ctype.h> to convert a single character to uppercase, and tolower to convert a single character to lowercase. Loop through the inputted string and do this for each character, and you've got it done.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  3. #3
    Unregistered
    Guest

    in need of urgent HELP!!!!!!!!!

    Yes...but is there a way to convert whole strings(it'd probably be faster)?

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    559
    You're not using strings, you're using char arrays.
    Truth is a malleable commodity - Dick Cheney

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Urgent Help Needed In Writing Algorithm!!
    By Vikramnb in forum C++ Programming
    Replies: 1
    Last Post: 01-09-2009, 12:46 PM
  2. beginner plzz help urgent
    By sara101 in forum C Programming
    Replies: 11
    Last Post: 01-14-2007, 10:38 PM
  3. pls help me urgent..
    By intruder in forum C Programming
    Replies: 4
    Last Post: 01-13-2003, 04:41 AM
  4. Help Needed: Borland C++ 5.5 Installation - URGENT!
    By Linette in forum C++ Programming
    Replies: 12
    Last Post: 03-09-2002, 06:44 PM
  5. Help.... Urgent... Thanks!
    By weihann in forum C Programming
    Replies: 0
    Last Post: 02-27-2002, 10:15 PM