I'm having trouble getting a reference to the WHOLE character that is passed through command line. Since argv's is made out of chars, i can't seem to get a get the whole string so i can further manipulate it using fopen.
If i have the following:
i can just print is usingCode:int main(int argc, char *argv[])
This is self explanatory , simply because "%s" joins the chars of argv.Code:printf("%s", argv[1])
Which works fine....
However if i use:
The first character (i.e. if i enter filename, f is passed to fopen).Code:File = fopen ( argv[1] , "r" );
So my question is how do i create a char that contains the whole passed in argument?



LinkBack URL
About LinkBacks


