Scientist42
Scientist42

Reputation: 77

C++/CLI: Using one namespace across multiple files

I have an question about creating namespaces in C++/cli.

I want to have 3 own classes in separate files, but I wanted to have it in one namespace. Is it possible? And how. Or could I just write namespace with same name in each file and would it be all linked together?

Thanks, K.

Upvotes: 2

Views: 780

Answers (1)

Matt Smith
Matt Smith

Reputation: 17434

Yes, you answered your own question. Namespaces are open, they can exist across files and across different assemblies. As you said, just make the namespace have the same name.

Upvotes: 3

Related Questions