Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / quick namespace question...

Author
Message
Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 4th Apr 2006 13:40 Edited at: 4th Apr 2006 14:04
Lets say I had two systems (each its own cpp file). I want each system to have its own namespace, thats easy enough. The problem is, now I want 'system one' to be able to read/write to some of 'system two's' data, or perhaps call one of its functions. If it were a simple matter of two namespaces in one cpp, this would be easy (via namespace::variable), but with multiple cpp's it doesnt work.

In short, how do you tell one cpp about another cpp's namespace?

*edit nevermind. according to this little thing I found on msdn, it looks like you just need to specify what namespace your variable/function belongs to in the declaration itself (ala int namespace1::a) then any file in your program can access it (ala namespace1::a).

All you need is zeal

Login to post a reply

Server time is: 2024-11-19 05:35:29
Your offset time is: 2024-11-19 05:35:29