由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - operator new in Java and C++
相关主题
java对cpp就是pfchang对大四川的区别self-nested class
向班上达人请教一个win7下面java编程的问题C++ Q90 - Q92 (转载)
C++ Q88: nested non-template class (转载)lambda的一个疑问
[C++] 入门级问题 increment and decrement operators能发自学日志么?
why copy assignment operator returns non-const type?本站身家超过32亿美元的著名程序员魏老师 (转载)
java inner class大家用的多么?我个人来说 很少用估计javascript 最初设计时就基本没考虑好scope问题
Nested classes inside one class (C++)大家每年给公司check in大概多少行的代码?
C++ Q73: template (skillport) (转载)一个烂设计的实例SmartThings
相关话题的讨论汇总
话题: c++话题: java话题: inner话题: new话题: operator
进入Programming版参与讨论
1 (共1页)
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?

1 (共1页)
进入Programming版参与讨论
相关主题
一个烂设计的实例SmartThingswhy copy assignment operator returns non-const type?
深入说说Nestjava inner class大家用的多么?我个人来说 很少用
C++含有指针成员的类Nested classes inside one class (C++)
Swift function 定义外部参数名 本地参数名 是不是脱了裤子放屁C++ Q73: template (skillport) (转载)
java对cpp就是pfchang对大四川的区别self-nested class
向班上达人请教一个win7下面java编程的问题C++ Q90 - Q92 (转载)
C++ Q88: nested non-template class (转载)lambda的一个疑问
[C++] 入门级问题 increment and decrement operators能发自学日志么?
相关话题的讨论汇总
话题: c++话题: java话题: inner话题: new话题: operator