?? makemain.cpp
字號:
//: C02:Makemain.cpp
// From Thinking in C++, 2nd Edition
// Available at http://www.BruceEckel.com
// (c) Bruce Eckel 2000
// Copyright notice in Copyright.txt
// Create a shell main() file
#include "../require.h"
#include <fstream>
#include <strstream>
#include <cstring>
#include <cctype>
using namespace std;
int main(int argc, char* argv[]) {
requireArgs(argc, 1);
ofstream mainfile(argv[1]);
assure(mainfile, argv[1]);
istrstream name(argv[1]);
ostrstream CAPname;
char c;
while(name.get(c))
CAPname << char(toupper(c));
CAPname << ends;
mainfile << "//" << ": " << CAPname.rdbuf()
<< " -- " << endl
<< "#include <iostream>" << endl
<< endl
<< "main() {" << endl << endl
<< "}" << endl;
} ///:~
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -