lost. Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill Cunningham

    lost. Help

    In a previous post I mentioned a beautifully working simple function
    called out with this prototype:

    int out (int n,char *buffer);

    Great. But how would I handle the command line? I have arrays and sub-arrays
    char *argv[] and argc.

    int main (int argc, char *argv[]) {
    /* In one of these two parameters I am going to have to take a
    string and send it back. What I want is a perfect version of puts. Which of
    these two parameters would take a single string like "hello world\n" and
    print it adding newline like puts ? I'm going to need extra functions. Maybe
    atoi and others. */

    return puts(string); /* from argc or argv[] */

    Am I making sense ?

    Bill


  • Bill Cunningham

    #2
    Re: lost. Help

    Lew alot of your code went over my head. Let me write a simple function
    of what I want.
    >
    Ok you're demonstrating how argc and argv works.

    Bill


    Comment

    Working...