Thread: Char array/ASCII questions

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    9

    Char array/ASCII questions

    1)Is there a function in the string.h header that allows you to combine the contents of multiple strings (char arrays), or will strcpy() accept multiple input strings?

    2)As an ASCII character, how is a space represented? 0?

  2. #2
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    yes strcat();
    string concatenation is that what you want right?
    in ascii it is ' ' or decimal 32. What do you want to do with space usually the former will suffice

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    8
    Try looking up strcat,

    If you're trying to add one string to the end of another.

    I think 0=space but I'm not 100%

  4. #4
    Registered User
    Join Date
    Dec 2002
    Posts
    8
    sorry linuxdude,

    look's like I was beten to the punch!

  5. #5
    Registered User
    Join Date
    Aug 2004
    Posts
    9
    Thanks alot - I was using loops but it ended up as a complete mess.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding info in a header file
    By hicpics in forum C Programming
    Replies: 8
    Last Post: 12-02-2005, 12:36 PM
  2. comparing fields in a text file
    By darfader in forum C Programming
    Replies: 9
    Last Post: 08-22-2003, 08:21 AM
  3. String sorthing, file opening and saving.
    By j0hnb in forum C Programming
    Replies: 9
    Last Post: 01-23-2003, 01:18 AM
  4. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM
  5. errors in class(urgent )
    By ayesha in forum C++ Programming
    Replies: 1
    Last Post: 11-10-2001, 10:14 PM