Hello, I'm creating my own namespaces and I had a quick question which I can't seem to answer.
The code below is an example of two namespaces I wrote to group the integer length of each and output it's length using 'distance1::length' and 'distance2::length' in int main()
if I were to declare all the elements of distance1 namespace by usingnamespace distance1 in the scope, would I be able to reference it in a newline with cout without using the conventional distance1::length style?
I've tried using
cout << distance1 << endl;
and get
error: expected primary-expression before ‘<<’ token
One more quick question, would it be conventional to use usingnamespace distance1 inside int main() rather than the scope? Both work, I'm just worried about the conventional standard.