[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


...define a globale variable in a objective c program?I...

<< Back to: Objective-C FAQ

Question by billbee
Submitted on 4/14/2004
Related FAQ: Objective-C FAQ
Rating: Not yet rated Rate this question: Vote
how to define a globale variable in a objective c program?I mean I want this varialbe can only be inited as the class be instanced.but  i can change it with the method in the class.
pl mail to billpop@ynmail.com


Answer by OOP hater
Submitted on 12/20/2005
Rating: Not yet rated Rate this answer: Vote
I have been struggling with the same issue with no success. I am becoming convinced that global variables are not allowed in objective-c. The books say to put the world PUBLIC in front of the variable's declaration. Unfortunaly the books don't give the proper syntax.  Everytime I do it, the compiler pukes it's guts out.

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: Objective-C FAQ


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.