Hi. This is probably a really simple question but I can't find how to do it in any of my notes!
I am writing a program in C and part of it needs to create a file, the name of which is inputted by the user. I have a char string called filename, which the user chooses using scanf. I then need to create the file with "filename".xls and add data to it. My file pointer is called 'file'. I'm guessing I need to use a line something like:
file=fopen("%s.xls",filename "w");
or:
file=fopen("(filename).xls","w");
But neither of these work!
Can anyone tell me what to do?
Cheers.
Chris