回答編集履歴
1
サンプルコードのミスを修正
test
CHANGED
@@ -3,16 +3,6 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
```
|
6
|
-
|
7
|
-
$ gcc -o sample sample.cpp
|
8
|
-
|
9
|
-
sample.cpp: In function ‘int main()’:
|
10
|
-
|
11
|
-
sample.cpp:10:23: error: invalid initialization of non-const reference of type ‘CBase&’ from an rvalue of type ‘CBase’
|
12
|
-
|
13
|
-
CBase& base = CBase();
|
14
|
-
|
15
|
-
^
|
16
6
|
|
17
7
|
$ cat sample.cpp
|
18
8
|
|