Skip to content

Commit 3b31601

Browse files
author
jason_yao
committed
update
1 parent 368864f commit 3b31601

2 files changed

Lines changed: 0 additions & 9 deletions

File tree

大話/note/code/simpleFactory

8 Bytes
Binary file not shown.

大話/note/code/simpleFactory.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
<<<<<<< HEAD
21
#include <iostream>
32
using namespace std;
43

54
//基類
6-
=======
7-
>>>>>>> 14d3b8f815a3a91095d901d67b7df12325c89591
85
class COperation {
96
public:
107
int m_nFirst;
@@ -15,18 +12,14 @@ class COperation {
1512
}
1613
};
1714

18-
<<<<<<< HEAD
1915
//加法
20-
=======
21-
>>>>>>> 14d3b8f815a3a91095d901d67b7df12325c89591
2216
class AddOperation : public COperation {
2317
public:
2418
virtual double GetResult() {
2519
return m_nFirst + m_nSecond;
2620
}
2721
};
2822

29-
<<<<<<< HEAD
3023
//減法
3124
class SubOperation : public COperation {
3225
public:
@@ -72,5 +65,3 @@ int main() {
7265
cout << op->GetResult() << endl;
7366
return 0;
7467
}
75-
=======
76-
>>>>>>> 14d3b8f815a3a91095d901d67b7df12325c89591

0 commit comments

Comments
 (0)