阅读背景:

如何避免在类中返回指针

来源:互联网 

Assume I have a class A that has say 3 methods. So the first methods assigns some values to the first array and the rest of the methods in order modify what is computed by the previous method. Since I wanted to avoid designing the methods that return an array (pointer to local variable) I picked 3 data member and store the intermediate result in each of them. Please note that this simple code is used for illustration. Assume I have a class A that has say 3 methods.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: