Sorry for asking a basic question but how would I do the following to get the pid to be part of the file name like this:
int pid;
int fOUT;enter code here
pid=getpid();
// TRYING TO EVALUATE HERE
char* filename=printf("hello-world-%i.txt", pid); # obviously wrong
//char* filename="here.txt";
fOUT= open (filename, O_RDWR | O_CREAT | O_SYNC);
thx for any help