Home Tutorial Iphone Examples Nslog NSLog NSInteger example code

 
 

Share on Google+Share on Google+
NSLog NSInteger example code
Posted on: July 29, 2009 at 12:00 AM
Advertisement
This example shows you how to print the value of NSInteger object with the help of NSLog function.

The following code example prints the value of NSInteger object using the NSLog function.

//
//  PrintNSInteger.h
//  DataTypes
//

#import <Foundation/Foundation.h>

@interface PrintNSInteger : NSObject

{

    NSInteger *mnsinteger;

}

-(void) print;

@end

The implementation of the PrintNSInteger class is as follows:

//
//  PrintNSInteger.m
//  DataTypes
//

#import "PrintNSInteger.h"

@implementation PrintNSInteger

-(void) print

{

    NSLog(@"NSInteger value :%@", mnsinteger);

}

@end

Advertisement

Related Tags for NSLog NSInteger example code:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 29, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com