Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
March 21, 2018, 03:21:49 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
Author Topic: #import <Foundation.Foundation.h>  (Read 6876 times)
Posts: 12

« on: May 31, 2009, 08:21:02 AM »

I am confused about the use of #import <Foundation.Foundation.h>
In some cases we use it in main.m, in others in the header file .h
For example in Program 8.4 page 168 and 169 (2nd edition) we use it in the XYPoint.h and Rectangle.h, but in Program 8.3 page 165 we place it in the Test Program main.m, while in Program 8.2 we do not even call for it once.
Does it matter where we call it?
Hero Member
Posts: 3114

« Reply #1 on: June 30, 2009, 09:22:00 AM »

Sorry, I somehow missed this post.

If Foundation.h is imported in a class header file (say Fraction.h) that subsequently gets imported in main.m, then there's no need to explicitly import Foundation.h again.   There's no harm in doing so, but it's not necessary.


Steve Kochan
Pages: [1]   Go Up
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 All rights reserved.