m****0 发帖数: 30 | 1 Totally wrong!
This is c and c++ -- high level programming language.
In fact, for some programming language, there is no difference between pre-
increment and post-increment. However, in c++, when you learn operator
overloading, you will see the difference.
A typical implementation of post-increment is like this:
SomeType SomeType::operator++(int)
{
SomeType temp(*this); // save current object
operator++(); // increment internal state using pre-increment
return temp; / |
|
n*w 发帖数: 3393 | 2 是不是我写的程序太简单了。同学们有没有写过带generic的interface?
举些例子? |
|
X****r 发帖数: 3557 | 3 interface DeepClonable> {
T deepClone();
} |
|
P********e 发帖数: 2610 | 4 java也什么都搞 个i
i interface. |
|
f******y 发帖数: 2971 | 5 so is c#, IList IEnumerator ... |
|
n*w 发帖数: 3393 | 6 这个i是interface的命名约定。比果子那个莫名其妙的i有道理多了。是个好习惯。 |
|