What I'm trying to do - if possible is open(create) a file using a dynamicly generated file name.
I"m working in a Linux environment using C
Currently the existing function is passed four variables from the main program, the function creates a message using the variables, then writes it to a file. One of the variables passed to the function is a "message ID" it would be perfect if I could find a way to name the file to be created with the messageID variable.
In theory Something like:
FILE *newfile;
newfile = fopen("%s",msgID, "w");
would be great, but of course fopen won't accept the additional argument so that won't work.
In any case, if I could just create a new unique file for each instance I could work around it not having the exact message ID as it's name.
Any ideas would be appreciated.
rm