Ios6 返回整数值

Ios6 返回整数值,ios6,integer,automatic-ref-counting,instance-variables,nslog,Ios6,Integer,Automatic Ref Counting,Instance Variables,Nslog,我正在Objective-CIOS6 ARC中编写ann应用程序。 这是一段代码: header file: @interface Chapter : NSObject -(void) addPageCount:(int) pCount; -(int)getPageCount; @end //implementation #import "Chapter.h" @interface Chapter() { int pageCount; } @end -(void)addPageC

我正在Objective-CIOS6 ARC中编写ann应用程序。 这是一段代码:

header file:
@interface Chapter : NSObject


-(void) addPageCount:(int) pCount;
-(int)getPageCount;
@end

//implementation
#import "Chapter.h"
@interface Chapter()
{

    int pageCount;
}
@end
-(void)addPageCount:(int) pCount
{
    pageCount = pCount;
}


//testing

 NSLog(@"%d", [chapter getPageCount]);

Returns -1073750816 once I pass 100.
问题是什么?
致以最诚挚的问候

解决方案已经找到。在某个时刻,我一直在发送一个指针值而不是整数