Thread: Strings

  1. #1

    Smile Strings

    I would really like to know if it is possible, (if so, how?) to split a string into a char variable, i know how to split the integers in a string to an int variable, but i would like to be able to validate words without validating each character from the string!
    Please help. thanks
    <a href="">email</a>

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Visalia, CA, USA
    Well a string is actually an array of char's. I don't know if that helps you much.

  3. #3
    char s[]="mystring";
    char myChar=s[0]; // of course the index can be 0 to strlen(s)-1

    But I think what you're saying is this : changing an entire string and placing its contents into a char variable, and that simply isn't possible. The string is comprised of characters, that's like fitting several oranges into one.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strings Program
    By limergal in forum C++ Programming
    Replies: 4
    Last Post: 12-02-2006, 03:24 PM
  2. Programming using strings
    By jlu0418 in forum C++ Programming
    Replies: 5
    Last Post: 11-26-2006, 08:07 PM
  3. Reading strings input by the user...
    By Cmuppet in forum C Programming
    Replies: 13
    Last Post: 07-21-2004, 06:37 AM
  4. damn strings
    By jmzl666 in forum C Programming
    Replies: 10
    Last Post: 06-24-2002, 02:09 AM
  5. menus and strings
    By garycastillo in forum C Programming
    Replies: 3
    Last Post: 04-29-2002, 11:23 AM