It seems as if that should work, and I'm not quite sure why it doesn't. Personally, I think this approach works better: (
fputs tutorial)
#include <stdio.h>
#include <windows.h>
#include <globstruct.h>
char szTemp[50];
FILE *pFile=fopen("test.txt","w");
if(pFile!=NULL){
sprintf(szTemp,"This is a test.n%dn%f",number,floatpoint);
fputs(szTemp,pFile);
fclose(pFile);
}
else{
MessageBox(g_pGlob->hWnd,"File create/open failed!","Attention",MB_OK);
}
Globstuct.h and Windows.h are only for the MessageBox() command, it's not necessary and can be taken out if you so choose.
Why are you calling dbMakeFile()? With dbOpenToWrite() the file should be created if it doesn't already exist.
My site, for various stuff that I make.