Results 1 to 4 of 4

Thread: Loads Of things

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    Hi,

    Dumn old me, serveral qs here:

    In C++ will

    char* Name;

    be able to hold the string "darren" of does this only store one char.

    What are the c++ equivelants to these:

    split()
    Collection
    Instr()
    Left()
    Right()
    Mid()

    Many thanks.

    [Edited by PsyVision on 11-25-2000 at 03:00 PM]

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    char *name is only a pointer. To use it, you need to do something like:
    Code:
    char *name = "Darren"
    However, you can't then change it, so you'd need something like:
    Code:
    char *darren = "Darren";
    char *name = new char[strlen(darren)+1];
    
    strcpy(name,darren);
    then you can alter name as much as you want.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    What about BSTR ?

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Er...that's very different.

    Use the string class from the STL.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width