Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void debugWrite(int lvl, char buff[])
- {
- if(debugLVL <= lvl)
- {
- FILE *fp;
- fp=fopen("/home/local/FERMI/s01093/Documenti/tpsit/debugLibrary/test.txt", "w"); //opens test.txt in the directory specified
- if(fp == NULL) //if file does not exist, create it
- {
- fp = fopen("test.txt", "wb");
- }
- fprintf(fp, "%s", buff); //writes in file test.txt
- fclose(fp);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement