views:

36

answers:

2

I need to pass a character to the line no. 2: First method I tried,

1) unichar dicttxt = [[myword lowercaseString] characterAtIndex:0];

   2) fileName = [[NSBundle mainBundle] pathForResource:dicttxt ofType: @"txt"];

2nd Method I tried,

NSString *dicttxt = [[myword lowercaseString] characterAtIndex:0];

fileName = [[NSBundle mainBundle] pathForResource:dicttxt ofType: @"txt"];

Both method suggest error Make pointer from integer without a cast.

+4  A: 
dreamlax
+1  A: 

Dreamlax’s answer is correct, but it doesn’t address the reason for your problem: unichar is not a class, and there is no such thing as a unichar object. If you command-double-click unichar in Xcode, it shows you the declaration:

typedef unsigned short unichar;

In other words, unichar is an alias to the primitive integer type unsigned short.

Ahruman
@Ahruman, thanks.