Jump to content
  • Sign Up
newe

почему не выводит 4ку на странице?

Recommended Posts

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>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Member Statistics

    46,837
    Total Members
    1,451
    Most Online
    HARDSOFT
    Newest Member
    HARDSOFT
    Joined
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...