• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: just C++ in xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: just C++ in xcode


  • Subject: Re: just C++ in xcode
  • From: Lawrence Gold <email@hidden>
  • Date: Thu, 29 Sep 2005 19:06:13 -0600

On Sep 29, 2005, at 5:54 PM, Joe Kurtz wrote:

Okay everyone, we're gettin' plenty of mileage from
this. But there's just one thing I don't yet
understand. I was pretty simplistic in my example. My
code actually looks more like one of Andreas'
examples:

in foo1.h:

#include <iostream>

namespace n { int x; };
void func();

You need to declare the variable extern in the header file and then define it in ONE .c file. Remember that #include literally pastes the text of the header file into the file including it, so every file that includes foo1.h is defining a separate x.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: just C++ in xcode
      • From: Markian Hlynka <email@hidden>
References: 
 >Re: just C++ in xcode (From: Joe Kurtz <email@hidden>)

  • Prev by Date: Re: Xcode beginner problem (tutorial build)
  • Next by Date: Re: application packaging?
  • Previous by thread: Re: just C++ in xcode
  • Next by thread: Re: just C++ in xcode
  • Index(es):
    • Date
    • Thread