Thread: Command line arguments

  1. #1
    Registered User
    Join Date
    Jul 2002

    Command line arguments

    int main(int arg, char** argc)

    what does ** mean ?
    why my program crash if I replace it with char* argc ?

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    char** is a pointer to a pointer. To save me explaining, do some web searching, or check your book (if you have one).

    Here's a starter for you. It explains about command line arg usage.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Jul 2002

    which is faster for a large data?
    a pointer to pointer is better or a pointer to array?
    Last edited by Kelvin; 07-12-2002 at 06:22 AM.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    >which is faster for a large data?
    It really depends on the data. If you have a set of strings which vary wildly in length then a pointer to a pointer or an array of pointers to char will be more space efficient. Usually when it comes to arrays, space is more of a concern than speed.

    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 01:17 AM
  2. GradeInfo
    By kirksson in forum C Programming
    Replies: 23
    Last Post: 07-16-2008, 03:27 PM
  3. command line arguments
    By vurentjie in forum C Programming
    Replies: 3
    Last Post: 06-22-2008, 06:46 AM
  4. Replies: 10
    Last Post: 09-27-2005, 12:49 PM
  5. NULL arguments in a shell program
    By gregulator in forum C Programming
    Replies: 4
    Last Post: 04-15-2004, 10:48 AM