Thread: converting a c++ style string into something execvp can use for args.

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    41

    converting a c++ style string into something execvp can use for args.

    I'm trying to use execvp which has the prototype:

    int execvp( const char *file, char *const argv[]);

    I'm using a C++ style string to get input from the user. How can I convert this C++ style string into something that execvp can use?

  2. #2
    Unregistered User
    Join Date
    Sep 2005
    Location
    Antarctica
    Posts
    341
    haven't I seen this post before? Just use myString.c_str() to convert to a const char *

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. Custom String class gives problem with another prog.
    By I BLcK I in forum C++ Programming
    Replies: 1
    Last Post: 12-18-2006, 03:40 AM
  3. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  4. Something is wrong with this menu...
    By DarkViper in forum Windows Programming
    Replies: 2
    Last Post: 12-14-2002, 11:06 PM