First of all, C ++ is not intended for such work. Therefore, it is not surprising that this is happening.
But, since you are using Visual Studio, you can use partial classes . Unfortunately, it seems that this characteristic is only related to C ++ / CX, so perhaps yo will not be able to use it.
You still need to declare a partial class in the namespace hierarchy, but I think it might be empty.
Honestly, I have not used this feature, and I do not know how far it can be bent to achieve what you want. But you can still try.
Remember, this is a Visual Studio extension, so your code will not be cross-platform.
Hope this helps. Somehow.
source share