name-clash

Problem mixing Objective-C and C++ code

I have an Objective-C/C++ application which uses functionality that is provided by a C++ library. One of the C++ classes includes an enum like this: class TheClass { public: [...] enum TheEnum { YES, NO, }; [...] }; Including (using #import -if that matters-) a header file with the above class declaration in an Objective-C/...

Name collisions between layers

So I'm developing a very cool (and very large) n-tier application. Basically I have the following assemblies: Domain Domain.Contracts Services Services.Contracts Presentation.Admin Presentation.Web Presentation.Core (shared between Admin & Web) I may implement Presentation.Core.Contracts My main issue I'm wrestling with are name c...

C++/VS2005: Defining the same class name in two different .cpp files

Somewhat of an academic question, but I ran into this while writing some unit tests. My unit test framework (UnitTest++) allows you to create structs to serve as fixtures. Usually these are customized to the tests in the file, so I put them at the top of my unit test file. //Tests1.cpp struct MyFixture { MyFixture() { ... do some se...