We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 368864f commit 3b31601Copy full SHA for 3b31601
2 files changed
大話/note/code/simpleFactory
8 Bytes
大話/note/code/simpleFactory.cpp
@@ -1,10 +1,7 @@
1
-<<<<<<< HEAD
2
#include <iostream>
3
using namespace std;
4
5
//基類
6
-=======
7
->>>>>>> 14d3b8f815a3a91095d901d67b7df12325c89591
8
class COperation {
9
public:
10
int m_nFirst;
@@ -15,18 +12,14 @@ class COperation {
15
12
}
16
13
};
17
14
18
19
//加法
20
21
22
class AddOperation : public COperation {
23
24
virtual double GetResult() {
25
return m_nFirst + m_nSecond;
26
27
28
29
30
//減法
31
class SubOperation : public COperation {
32
@@ -72,5 +65,3 @@ int main() {
72
65
cout << op->GetResult() << endl;
73
66
return 0;
74
67
75
76
0 commit comments