I'd look over the symbol names first, like NULL and fprint, not to mention that weird \0. As an additional thought, you should close the file after writing to make sure it gets flushed to disk, and double check that futilis variable is a char* that contains a valid, writeable path.