main.cpp
来自「C++ Source code from a tutorial」· C++ 代码 · 共 26 行
CPP
26 行
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[])
{
if (rename("c:/dog.txt","c:/dog.dat") != 0) {
cout << "With all due respect, I was" << endl;
cout << "unable to do what you told" << endl;
cout << "me to. Therefore I quit." << endl;
}
if (rename("c:/dog.dat","c:/temp/cat.txt") != 0) {
cout << "Same old story. No respect at all" << endl;
cout << "for all that work I do for you." << endl;
cout << "So needless to say, I just could" << endl;
cout << "not do what you wanted of me." << endl;
}
cout << rename("c:/dog","c:/dog2") << endl;
system("PAUSE");
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?