 <p>First of all, C++ is not designed to work like that. So it is not a surprise that this is happening.</p> <p>But, since you're using Visual Studio, you could take advantage of <a href="http://en.wikipedia.org/wiki/C%2B%2B/CX#Partial_classes" rel="nofollow">partial classes</a>. Unfortunately, it seems this characteristic is only related to C++/CX so maybe yo won't be able to use it.</p> <p>You will still need to declare a partial class in your namespace hierarchy, but I guess it could be empty.</p> <p>To be honest, I haven't used this feature and I don't know how far can it be bent in order to achieve what you want. But you could anyway give it a try.</p> <p>Remember that this is a Visual Studio extension, so your code won't be cross-platform.</p> <p>Hope this helps. Somehow.</p>