help with html file writing

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
MaDpRoGrAmMeR
Posts: 12
Joined: Fri Sep 24, 2004 5:26 pm

help with html file writing

Post by MaDpRoGrAmMeR »

i want to write the output and logs in to a output.html file how can i do this
we have got a xml writer u know and i want a html writer too please help me
..:::radiation interactive:::..
T101
Posts: 44
Joined: Thu Jul 29, 2004 4:41 pm

Post by T101 »

Exactly what do you mean by " output"?

It's quite simple to just dump a header, some lines and a footer into a text file, you know.
If all you're doing is writing text lines to a .html file, all you need to do is write tags and text.
No need for anything complicated, just something along the lines of:

FILE *logfile;
logfile=fopen(logfilename,"w");
fprintf(logfile,"<html>\n<title>log file</title>\n<body>\n");


// when you have some message text to print:
fprintf(logfile,"<p>%s</p>\n",messagetext);


fprintf(logfile,"</body></html>\n");
fclose(logfile);
Post Reply