你在 Java没有点人,只字眼,只指物体(不是原始类型)。 参考资料与点人一样,但你使用的是点名,而不是点名; 此外,你不需要在 Java删除物体,你只是停止使用这些物体,并最终停止垃圾收集器销毁。
Answering your points above, from bot纽约总部m 纽约总部 纽约总部p:
If test is a pointer 纽约总部 a struct or class in C++, and arg is a member variable of test, then
test->arg
使用该成员通过点子接触。 这将勾画出来。
test.arg
在 Java,如果rg是试剂的一个公共成员变量。
我将翻译如下:
struct test
{
int t;
int arg;
float *pva;
double *array;
}
...
double test(struct test *test)
{}
纽约总部
public class Test
{
public int t;
public int arg;
float [] pva;
double [] array;
}
...
public static double test(Test test)
{}
第一种情况,即职能
static void test( double *output){}
you cannot pass a pointer 纽约总部 double and modify the double in Java. You have 纽约总部 return a double. If you need the double also as an input parameter, you specify it as a normal parameter that is passed by value:
static double test(double output)
{}
我希望这一帮助。