Thread: Array of string

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    2

    Smile Array of string

    How to dynamically allocate memory for an array of string?
    i.e. char **string

    Thanks

  2. #2
    Registered User
    Join Date
    Jul 2002
    Posts
    8
    i think somthing like that:
    char **string;
    string = (char**)malloc(sizeof(char**));

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Read this for 2-d array help.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Registered User
    Join Date
    Jul 2002
    Posts
    2

    Thanks a lot

    The link is useful, thanks a lot.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pointer to array of string and Array of Pointer to String
    By vb.bajpai in forum C Programming
    Replies: 2
    Last Post: 06-15-2007, 06:04 AM
  2. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 09:11 AM
  3. Program using classes - keeps crashing
    By webren in forum C++ Programming
    Replies: 4
    Last Post: 09-16-2005, 03:58 PM
  4. Calculator + LinkedList
    By maro009 in forum C++ Programming
    Replies: 20
    Last Post: 05-17-2005, 12:56 PM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM