Home Tutorial Iphone Examples Nslog NSLog NSInteger example code

 
 

NSLog NSInteger example code
Posted on: July 29, 2009 at 12:00 AM
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

Related Tags for NSLog NSInteger example code:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.