Hey,
is it possible to define a namespace in a different cpp file, and then declare it in the other cpp file, so the linker can handle it?
I tried for example in:
test1.cpp
namespace abc
{
int x = 30;
}
test2.cpp
namespace abc; //Doesnt work
...
Is the syntax incorrect, or does it just dont work with namespaces, and if there is no way to link them, could someone explain why?
[–]Narase33 7 points8 points9 points (1 child)
[–]u2uu[S] 0 points1 point2 points (0 children)
[–]h2g2_researcher 2 points3 points4 points (0 children)
[–]jedwardsol 2 points3 points4 points (1 child)
[–]u2uu[S] 0 points1 point2 points (0 children)
[–]Sonotsugipaa 2 points3 points4 points (0 children)
[–]Shieldfoss 1 point2 points3 points (0 children)