⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 header.cpp

📁 This package consists of the executable (UCW), a default script file, this file, and the library fi
💻 CPP
字号:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main(int argc, char **argv)
{
  string name = argv[1];
  string file = name;
  string lib = "";
  if (argc == 2) file += ".h";
  else if (argv[2] == string("lib")) {
     lib = argv[3];
  }
  ofstream out(file.c_str());
  string guard_macro = "__" + name + "_H";
  out << "// UnderC Development Project, 2001\n" << endl;
  out << "#ifndef " << guard_macro << endl;
  out << "#define " << guard_macro << endl;
  if (lib != "") 
    out << "#lib " << lib << endl;
  out << endl;
  if (lib != "")
    out << "#lib" << endl;
  out << "#endif" << endl;
  return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -