Thread: argument passing

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    12

    argument passing

    Again, another simple question:

    If I have a function header:

    void foo (char *s, char **s2)

    Can I call the function like this:

    char *string1;
    char *string2[10];

    <something here to put values into string1 and string2>

    foo(string1, string2);

    or should the function header be:

    void foo (char *s, char *s2[])
    Thanks.

  2. #2
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    if you dereference either correctly it can be your choice.
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 04-21-2008, 12:15 PM
  2. function passing argument..array ?
    By jochen in forum C Programming
    Replies: 2
    Last Post: 09-30-2007, 11:53 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Passing function as an argument.
    By hyaku_ in forum C Programming
    Replies: 1
    Last Post: 12-11-2005, 04:43 AM
  5. problem passing an option as command line argument
    By papous in forum C Programming
    Replies: 3
    Last Post: 11-22-2001, 06:12 PM