B
Bill Cunningham
Since I've been told that char *argv[] or char **argv[] must be the
second parameter to main's command line structure I have turned to strtod( )
but can't get it to work so far. This function is probably used alot but I
obviously am not using it right.
#include <stdio.h>
int main(int argc, char **argv) {
if (argc != 3) {
fprintf(stderr,"usage error");
}
strtod(argv[1],(char**);
strtod(argv[2],(char**);
printf("%f"argcv[1],"divided by ","%f",argv[2]," is
",argv[1]/argv[2]);
}
This is one of many tried of strtod( ) I've tried on my own.
Bill
second parameter to main's command line structure I have turned to strtod( )
but can't get it to work so far. This function is probably used alot but I
obviously am not using it right.
#include <stdio.h>
int main(int argc, char **argv) {
if (argc != 3) {
fprintf(stderr,"usage error");
}
strtod(argv[1],(char**);
strtod(argv[2],(char**);
printf("%f"argcv[1],"divided by ","%f",argv[2]," is
",argv[1]/argv[2]);
}
This is one of many tried of strtod( ) I've tried on my own.
Bill