iPhone & Cocoa
아이템 개수 가져오기
iwoohaha
2009. 12. 20. 13:21
반응형
// ResponseTr 의 헤더에서 데이터의 크기 가져오기
int nBodyLength = [[[[NSString alloc] initWithBytes:(*ResponseTr).Header.szBodyMessageLen length:4 encoding:NSASCIIStringEncoding] autorelease] intValue];
// Body 에 들어있는 아이템 개수 구하기
int nItemCount = (nBodyLength - sizeof((*ResponseTr).Body.szSearchValue)) / sizeof(MOBILO_2230_RESPONSE_BODY_ITEM);
NSLog(@"Body Length = %d, Item Count = %d", nBodyLength, nItemCount);
int nBodyLength = [[[[NSString alloc] initWithBytes:(*ResponseTr).Header.szBodyMessageLen length:4 encoding:NSASCIIStringEncoding] autorelease] intValue];
// Body 에 들어있는 아이템 개수 구하기
int nItemCount = (nBodyLength - sizeof((*ResponseTr).Body.szSearchValue)) / sizeof(MOBILO_2230_RESPONSE_BODY_ITEM);
NSLog(@"Body Length = %d, Item Count = %d", nBodyLength, nItemCount);
반응형