Ok, I don't get it. This fprintf() statement isn't printing the string it should be. I swear it worked when I had it setup the exact same way in another program. It keeps printing "(null)" now though.
Code:
char distext[224];
FILE *f;
f = fopen(filename,"wt");
if (!(f)) { MessageBox(NULL,"Unable to open file (PrintResults,1).","Error",0); return 0; }
sprintf(distext,"some text %d", somevalue);
fprintf(f,"%08X: %08X %s\n", vaddr, value, distext);
MessageBox(NULL,distext,"Debug",0); //this shows the text fine, but fprintf prints null in place of the string. WHY?
edit: unbelievable. value being a U64 was screwing it up.