📄 list3-14.cpp
字号:
//Listing 3.14
// This program uses the ofstream class to
// generate a simple HTML skeleton
// that can be opened with a web browser.
#include <iostream>
#include <fstream>
using namespace std;
void main(void)
{
ofstream Internet("WebPage.html");
Internet << "<html>" << endl << "<head>" << endl;
Internet << "<title>C++ Standard Class Library</title>" << endl;
Internet << "</head>" << endl << "<body>" << endl;
Internet << "<h3>Object Oriented I/O</h3>" << endl;
Internet << "The iostreams can be used to generate HTML files!" << endl;
Internet << "and Web pages" <<endl;
Internet << "</body>" << endl << "</html>" << endl;
Internet.close();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -