namespace mynamespace {
double length;
}
otherwise you will get errors like "multiple definition of ***" during the linking stage. What you should do, is to declare the global variables, for example
namespace mynamespace {
extern double length;
}
And then you define the global variables in "mynamespace.cpp".
2 comments:
Thanks a lot, this was exactly what I was looking for! Cheers, Tim
Man you can't imageine how long I was looking for this. Thanks a lot!
Post a Comment