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

  • SEARCH
  • Home
  • 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 4598952
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:28:19+00:00 2026-05-21T23:28:19+00:00

I declare extern NSDate *chooseDate in my global.h file. I include this file in

  • 0

I declare “extern NSDate *chooseDate” in my “global.h” file. I include this file in my “blueview” and in blueview I add the line “NSDate *chooseDate = YES”. I get the warning message as shown in the title. I have read up on this, and I understand that the warning is saying that I am trying to assign an object to an integer. The part I don’t get is that I am declaring chooseDate as an NSDate in both files. I don’t understand how either is an integer. The funny part is that my program works correctly, I am just trying to get rid of this warning. Any help would be greatly appreciated.

  • 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-05-21T23:28:19+00:00Added an answer on May 21, 2026 at 11:28 pm

    You’re reading the error backwards: It says you’re trying to assign an integer to an object variable. So you’re correct that the variable is an object pointer, but YES is not a pointer to an NSDate object, it is a BOOL value (which is a kind of integer).

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

Sidebar

Related Questions

can we declare a function in a header file in following way? extern int
So i have this issue : i am declaring some extern global variables in
How to declare and use global variable with extern in Objective C and other
In kern/task.h, i found the declare: __BEGIN_DECLS extern task_t current_task(void); extern void task_reference(task_t task);
Say I declare a header file with a variable: int count; Then in the
Consider following code: main.cpp: #include <iostream> typedef void ( * fncptr)(void); extern void externalfunc(void);
In one header file, i have a inline function define like bellow: extern CMODEXPORT
I declare my struct in a header file like so: typedef struct MyStruct{ int
Possible Duplicate: What is the correct way of using extern for global variables ?
I need to declare an array of pointers to functions like so: extern void

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.