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:
Code:
int main(int argc, char *argv[])
i can just print is using
Code:
printf("%s", argv[1])
This is self explanatory , simply because "%s" joins the chars of argv.
Which works fine....
However if i use:
Code:
File = fopen ( argv[1] , "r" );
The first character (i.e. if i enter filename, f is passed to fopen).
So my question is how do i create a char that contains the whole passed in argument?