cpp "using namespacename"; . , .h, . :
namespace Namespacename {
classname::methodname () { ... };
...etc.
}
, , .
, :
#include "test.h"
namespace TestNamespace {
void TestClass::setValue(int &aI)
{
i=aI;
}
int TestClass::value()
{
return i;
}
void testFunc(TestClass &myObj)
{
int j = myObj.i;
}
}
, "" . , "std", , , . , , , .
, "Test" "Test" . , using TestNamespace; TestClass, Test::Class. , , , , , , .