Question about functions of string vs char string

This is a discussion on Question about functions of string vs char string within the C++ Programming forums, part of the General Programming Boards category; In the using of char strings(char x[50]) you are able to assign, change, and veiw what is in the string ...

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    10

    Question about functions of string vs char string

    In the using of char strings(char x[50]) you are able to assign, change, and veiw what is in the string based on position. For strings(string x) is it possible to do the same? If so, would you mind giving me examples so I can see?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,712
    Quote Originally Posted by Robertjh12
    For strings(string x) is it possible to do the same?
    Yes.

    Quote Originally Posted by Robertjh12
    If so, would you mind giving me examples so I can see?
    Try searching the Web for "C++ string".
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jul 2011
    Posts
    10
    Alright, didn't think to do that, my head is a bit mixed up with code

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 11
    Last Post: 06-16-2011, 11:59 AM
  2. Replies: 2
    Last Post: 09-12-2010, 09:15 AM
  3. Find index of last char in search string in string?
    By Programmer_P in forum C++ Programming
    Replies: 6
    Last Post: 06-07-2010, 06:51 PM
  4. convert char** (c string array) to std::string[]
    By umen242 in forum C++ Programming
    Replies: 2
    Last Post: 11-11-2008, 04:52 AM
  5. Char / string Question
    By cboard_member in forum C++ Programming
    Replies: 6
    Last Post: 07-11-2005, 11:16 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21