Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #include, loading, and c++




On Mar 31, 2006, at 07:38 , email@hidden wrote:

Hi,
   According to the xcode help

2.2 Include Operation

The #include directive works by directing the C preprocessor to scan the specified file as input before continuing with the rest of the current file. The output from the preprocessor contains the output already generated, followed by the output resulting from the included file, followed by the output that comes from the text after the #include directive. For example, if you have a header file header.h as follows,
[snip]
but if I remove the random function and place it in a separate file as so, it does not
[snip]
Will someone explain this to me

It helps us help you if you actually tell us what is wrong: "it broke" is not much to go on, and we can't hope to probe tea leaves to figure out what broke. For starters, what did you do, and what does "it does not" mean? To help you on your way, if I take your second two .cc files and compile them, from the command line, with "g++ -c main.cc", it compiles with no complaints.


Regards,

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
My wife 'n kids 'n dogs are gone,
I can't get Jesus on the phone,
But Ol' Milwaukee's Best is my best friend.
-----------


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >#include, loading, and c++ (From: <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.