Share on Google+Share on Google+

NSLog NSInteger example code

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

Advertisements

Posted on: July 29, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial 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.