Welcome, Guest. Please login or register.
Did you miss your activation email?
April 30, 2017, 11:38:40 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Program Examples
| | |-+ Chapter 8
| | | |-+ #import <Foundation.Foundation.h>
Pages: [1] Go Down
Author Topic: #import <Foundation.Foundation.h> (Read 6704 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:

Login with username, password and session length

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 (c) 2009 classroomM.com. All rights reserved.