仍然在C++工作,但这出现在我的书中,我不明白它是什么:
MyClass * FunctionTwo (MyClass *testClass) {
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我的问题是第一个间接运算符的重要性是什么
(MyClass *[<- this one] FunctionTwo(MyClass *testClass))?
Run Code Online (Sandbox Code Playgroud)
我尝试在代码块中创建一个类似的函数,有和没有第一个*,我没有看到它运行的方式或输出的任何差异:
int *testFunc(int *in) {
cout << in << endl;
cout << *in << endl;
return 0;
}
int testFuncTwo(int *in) {
cout << in << endl;
cout << *in << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我在书中找不到任何解释它的地方.
谢谢,
卡尔