Quote:
Originally posted by KawaiiCB
Thanks for the info there, any idea about the first one? how to pass the actual array of char as opposed to the pointer to the memory location?
example, i'm passing the filenames to a new section before opening them. assuming i kept the name Arguments and passed Arguments[1] eg.
in the main method call the following method with
[start of code]
OpenThisFile(Arguments[1]);
void OpenThisFile(char* FileName) {
FILE *inputfile = fopen(FileName, "r");
}
[end of code]
also, how do i convert char* to the required type in the fopen() section. i think it's meant to be something other than char*
Have a good one,
Shaun
FILE *foobar = fopen (argv[1], "r");