i Language
How to write a *.CPP to output *.htm
by J.w. Schro on Jul.28, 2008, under i Language
This is what I learn from a sample,and I just get some public, useful template.
Just as follows to show:
//////////////////////////////////////////////////////////////////////////
#include <string>
#include <fstream>
using namespace std;
void main()
{
fstream reportFs;
char *reportFile = “reportSample.htm”;
reportFs.open(reportFile, fstream::in | fstream::out | fstream::app);
//////////////////////////////////////////////////////////////////////////
reportFs << “<table width=\”1373\” height=\”328\” border=\”1\” bordercolor=\”#000000\”>\n”;
reportFs << “</TABLE>”;
reportFs.close();
}
//////////////////////////////////////////////////////////////////////////
the red part is the source codes about the web page.
If the web page has “=” in it ,you should put “\” in it like the red part,or there will be a problem about compiling it.
[in Chinese]
我自己总结出来的输出网页的程序模板。仅供参考。
在 reportFs <<“在这里输入网页源代码\n”;
值得注意的是,在原代码中会有=“内容”这种格式需要改成=\”内容\”。这就可以了。
