i**p 发帖数: 902 | 1 We can use "new" for Java inner class like this:
Outer.Inner o = outer.new inner()
I don't remember C++ has the same usage. Is there any case we can use "new"
in C++ like that? |
X****r 发帖数: 3557 | 2 C++'s nested class is similar to Java's static inner class. Java's
non-static inner class has no equivalency in C++, so the usage in your
example doesn't apply.
"
【在 i**p 的大作中提到】 : We can use "new" for Java inner class like this: : Outer.Inner o = outer.new inner() : I don't remember C++ has the same usage. Is there any case we can use "new" : in C++ like that?
|
N******K 发帖数: 10202 | 3 现用c++ 还要new 就等死好了
"
【在 i**p 的大作中提到】 : We can use "new" for Java inner class like this: : Outer.Inner o = outer.new inner() : I don't remember C++ has the same usage. Is there any case we can use "new" : in C++ like that?
|