Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7730763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:18:28+00:00 2026-06-01T06:18:28+00:00

I am looping through an NSString object called previouslyDefinedNSString and verifying if the integer

  • 0

I am looping through an NSString object called previouslyDefinedNSString and verifying if the integer representing the ASCII value of a letter is in an NSMutableSet called mySetOfLettersASCIIValues, which I had previously populated with NSIntegers:

NSInteger ASCIIValueOfLetter;

    for (int i; i < [previouslyDefinedNSString length]; i++) {

        ASCIIValueOfLetter = [previouslyDefinedNSString characterAtIndex:i];

        // if character ASCII value is in set, perform some more actions...
        if ([mySetOfLettersASCIIValues member: ASCIIValueOfLetter])

However, I am getting this error within the condition of the IF statement.

Incompatible integer to pointer conversion sending 'NSInteger' (aka 'int') to parameter of type 'id';
Implicit conversion of 'NSInteger' (aka 'int') to 'id' is disallowed with ARC

What do these errors mean? How am I converting to an object type (which id represents, right?)? Isn’t NSInteger an object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:18:29+00:00Added an answer on June 1, 2026 at 6:18 am

    You want to make it an NSNumber, as in:

    NSInteger ASCIIValueOfLetter;
    
        for (int i; i < [previouslyDefinedNSString length]; i++) {
    
            ASCIIValueOfLetter = [previouslyDefinedNSString characterAtIndex:i];
    
            // if character ASCII value is in set, perform some more actions...
            if ([mySetOfLettersASCIIValues member: [NSNumber numberWithInteger: ASCIIValueOfLetter]])
    

    Now you’re going to have the result you’re looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While looping through a Dataset which code snippet should I use, should I go
I'm looping through a file line by line, it has key->value pair that I'm
I'm looping through a mysql query and storing the values to an object. I
When looping through a very large language (say in C# 1.0), which is, for
When looping through a DataRow and encountering types such as DataRow dr; dr[someString] dr[someInteger]
I am looping through a large text file and im looking for lines that
I'm looping through an associative array with a foreach. I'd like to be able
I'm looping through thousands of strings with various regexes to check for simple errors.
I'm looping through multiple checkboxes with the same class with function each() and inside
I am looping through an array of strings, such as (1/12/1992 apple truck 12/10/10

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.