simple AnsiString to char* conversion

Discussion in 'C++' started by Mendon?a, Oct 9, 2003.

  1. Mendon?a

    Mendon?a Guest

    I cant seem to find on borland help files anything about AnsiString to
    char conversion. Just the opposite. Can u help me?
     
    Mendon?a, Oct 9, 2003
    #1
    1. Advertising

  2. "Mendon?a" <> wrote in message
    news:...
    > I cant seem to find on borland help files anything about AnsiString to
    > char conversion. Just the opposite. Can u help me?


    Wrong newsgroup. However, borland's class provides
    the same member function as the standard std::string
    class: c_str()

    const char* ps = myStr.c_str();

    Cheers,
    Ivan
    --
    http://ivan.vecerina.com
    http://www.brainbench.com <> Brainbench MVP for C++
     
    Ivan Vecerina, Oct 9, 2003
    #2
    1. Advertising

  3. Mendon?a

    klaas Guest

    Mendon?a wrote:

    > I cant seem to find on borland help files anything about AnsiString to
    > char conversion. Just the opposite. Can u help me?

    AnsiString x("dickheadsix");
    char * f = x.c_str();
    would do it
     
    klaas, Oct 9, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JNY
    Replies:
    5
    Views:
    11,835
    Duane Hebert
    Jan 7, 2005
  2. lovecreatesbeauty
    Replies:
    1
    Views:
    1,121
    Ian Collins
    May 9, 2006
  3. Franz Seidl

    Converting AnsiString to double

    Franz Seidl, Sep 17, 2005, in forum: C++
    Replies:
    9
    Views:
    3,528
    Dweia
    Sep 19, 2005
  4. crash
    Replies:
    2
    Views:
    358
    Lionel B
    Jul 12, 2007
  5. Michael Bell

    What is AnsiString?

    Michael Bell, Oct 11, 2007, in forum: C++
    Replies:
    5
    Views:
    576
Loading...

Share This Page