📄 example.cc
字号:
// file: $isip/doc/examples/class/shell/shell_example_00/example.cc// version: $Id: example.cc,v 1.3 2001/01/16 20:25:40 duncan Exp $//// isip include files//#include <CommandLine.h>#include <Filename.h>#include <String.h>#include <File.h>// main program starts here//int main (int argc, const char **argv) { // create command line // CommandLine cmdl; // set help message // cmdl.setHelp( #include "helpmessage.text" ); // parse the command line // cmdl.parse(argc, argv); // checks the number of arguments on the command line // if (cmdl.numArguments() != 3) { Console::put(L"you must specify a filename and two strings"); cmdl.printUsage(); } // get file name // String old_filename; cmdl.getArgument(old_filename, 0); // get two strings // String replacethis; String replacewith; cmdl.getArgument(replacethis, 1); cmdl.getArgument(replacewith, 2); Filename filename; filename.assign(old_filename); // replace the file name // filename.replace(replacethis, replacewith); // changes the filename in the directory // File file; file.rename(old_filename, filename); // exit gracefully // Integral::exit();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -