1 код с++
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main() {
cout << "content-type:text/html;charset=windows1251\n\n";
ifstream f("C:/Users/артур/source/repos/saitforskobki/HTMLPage.htm");
if (f.is_open())
{
char* ln = new char[1024];
while (!f.eof())
{
f.getline(ln, 1024);
if (strcmp(ln, "<!--content-->") == 0)
{
cout << 4;
}
else {
cout << ln;
}
}
}
return 0;
}
2 html код
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio">
<TITLE></TITLE>
</HEAD>
<form action='skob.cgi' method='get'>
<input type='text' name='fn'><br>
<input type='submit' value='OK'>
</form>
<BODY>
<!--content-->
</BODY>
</HTML>