iPhone:App crashes while fetching the character from array to unichar
I have an array with two blank characters as follows: 

    shuffleArray = [[NSMutableArray alloc] initWithObjects:@"H",@"E",@"",@"",@"O", nil];

Now I want to assign the values of array to unichar for further coding as follows:

    for(int i=0; i<=[shuffleArray count]; i++)
    {
           NSString *temp = [shuffleArray objectAtIndex:i];
            NSLog(@"string:%@",temp);
            unichar c = [temp characterAtIndex:0];
    }

 it prints "H" and "E" fine but when it found blank characters i.e. @"" .

It gets crash at  the point

    unichar c = [temp characterAtIndex:0];

How can I solve this problem.

Any help will be appriciable.

Thanx in advance..

   



iPhone:App crashes while fetching the character from array to unichar
===

I have an array with two blank characters as follows: 

    shuffleArray = [[NSMutableArray alloc] initWithObjects:@"H",@"E",@"",@"",@"O", nil];

Now I want to assign the values of array to unichar for further coding as follows:

    for(int i=0; i<=[shuffleArray count]; i++)
    {
           NSString *temp = [shuffleArray objectAtIndex:i];
            NSLog(@"string:%@",temp);
            unichar c = [temp characterAtIndex:0];
    }

 it prints "H" and "E" fine but when it found blank characters i.e. @"" .

It gets crash at  the point

    unichar c = [temp characterAtIndex:0];

How can I solve this problem.

Any help will be appriciable.

Thanx in advance..

   


