📄 main.cpp
字号:
#include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
class CocoaBean {
public:
string Process(string S) {
return S + ": Done";
}
};
class Chocolate : public CocoaBean {
public:
// using CocoaBean::Process; // for Borland and Microsoft
string Process(string S) {
return CocoaBean::Process(S);
}
float Process(float F) {
return F * 2.1;
}
};
int main(int argc, char *argv[])
{
Chocolate smooth;
string amount = "Milk";
cout << smooth.Process(amount) << endl;
system("PAUSE");
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -