0

Objective-C iOS6 ARC에 ann app을 쓰고 있습니다.정수 값을 되 돌리는 중

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. 

확률값은 무엇입니까 : 이 코드 조각은 무엇입니까? 베스트

답변

0

해결책이 발견되었습니다. 어떤 시점에서 정수 대신 포인터 값을 보냈습니다

관련 문제