【发布时间】:2015-01-26 12:51:06
【问题描述】:
操作中.h
@interface Operation : NSObject
-(float)addition:(float)number1 plusWith:(float)number2;
@end
在操作中.m
#import "Operation.h"
@implementation Operation
-(float)addition:(float)number1 plusWith:(float)number2 {
return number1 + number2;
}
@end
在 ViewController.m 中
#import "Operation.h"
- (void)viewDidLoad {
[super viewDidLoad];
Operation *Math = [[Operation alloc] init];
float doPlus = [Math addition:3.0 plusWith:4.0];
NSLog(@"%f + %f = %f",3.0,4.0,doPlus);
}
为什么运行时只返回 (lldb) ?我的错误在哪里? 我的调试区:
【问题讨论】:
-
我得到了输出 | 3.000000 + 4.000000 = 7.000000
-
当它停在 (lldb) 时,键入命令“bt”并将它打印的内容粘贴到您的问题中。
-
thread info和bt都可以发光。 -
@AshishKakkad - 谢谢你的提及,但这太棒了!
-
@PhillipMills 和 Rob:谢谢您的回复!我已将我的调试区域图像添加到问题中。
标签: ios function class xcode6 lldb