Mailing Lists: Apple Mailing Lists

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

using namespace in xcode and dev-c++



I am trying to hammer out a couple differences between compilers. I use xcode and dev-c++. The use of namespace is different between the two compilers.

In Dev-C++ you may put the following in a .h or .cpp file

#include "globalstuff.h"
using namespace globalstuff.h;

In the associated header is the following

#include <cstdlib>
#include <iostream>...

namspace globalstuff
{
#include "node.h"
#include "node.cpp" ..
}

This avoids duplication of headers and libraries. This works fine in Dev-C++ but produces errors in xcode (The .cpp file does not see it's associated .h file). My readings in my class textbooks suggests this should work. Does anyone know why it does not work in xcode.


Thanks

Jeffery Shipman
email@hidden



_______________________________________________
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


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.