阅读背景:

如何在多次调用后从方法中提取静态int

来源:互联网 

For my beginner's level independent study of Objective-C, I was asked to add a counter to a class, so that each time a method was used on it, it would ++. However, I misinterpreted this as "Each time the method the method is called, ++." After realizing how to do what was asked of me, I pondered how I could fashion a method that would return a counter in addition to what the method was called to return. If I were to use a static int in addition to variable++; on each call of the method, how can I extract that value of variable in my main program?For my beginner's level independent study of Ob




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

分享到: