質問編集履歴
1
Used the markup for scripting codes.
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
https://www.programiz.com/cpp-programming/increment-decrement-operator-overloading
|
3
3
|
に、変数に対して前置きのオペレータと、後置きのオペレータについて例題を示して解説があります。
|
4
4
|
|
5
|
-
下記に引用するこの例題の中に、例えばオペレータが
|
5
|
+
下記に引用するこの例題の中に、例えばオペレータが```++```であれば、後置きの場合はオペレータ関数の定義時に、```Class-Name operator ++ (int)```と記述する、とあります。
|
6
6
|
|
7
7
|
この理由に、
|
8
8
|
This int gives information to the compiler that it is the postfix version of operator.
|
9
9
|
Don't confuse this int doesn't indicate integer.
|
10
10
|
として、
|
11
|
-
「この括弧内の
|
11
|
+
「この括弧内の```int```は```integer```の意味ではなく、コンパイラにこのオペレータが後置き型であることを示しているのだ」、
|
12
12
|
と言っています。
|
13
13
|
|
14
|
-
私は、
|
14
|
+
私は、```int```は```integer```の意味、と学んできたので戸惑っています。
|
15
15
|
これについて、入門者向けの解説が出来る方に、ご案内をおねがいします。
|
16
16
|
|
17
17
|
|