B
Bill Cunningham
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
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