L
Luca Cerone
Dear all,
I've a header mylib.h
that contains the line
using namespace std ; // before the declaration of my namespace
//and functions.
I put this because I'm declaring several functions that use vectors
and strings and I'd like not to write std:: in front of every of such types.
Everything works fine, but there is a small issue:
when I include the header in my main.cpp
it is like if I've written
using namespace std ;
in the preamble.
For the std it is no big deal, but for my custom namespaces it is.
So how can I use the namespace in mylib.h and its implementation mylib.cpp,
but not in the main.cpp? (unless explicitely declared of course).
Thanks a lot in advance,
Cheers, Luca
I've a header mylib.h
that contains the line
using namespace std ; // before the declaration of my namespace
//and functions.
I put this because I'm declaring several functions that use vectors
and strings and I'd like not to write std:: in front of every of such types.
Everything works fine, but there is a small issue:
when I include the header in my main.cpp
it is like if I've written
using namespace std ;
in the preamble.
For the std it is no big deal, but for my custom namespaces it is.
So how can I use the namespace in mylib.h and its implementation mylib.cpp,
but not in the main.cpp? (unless explicitely declared of course).
Thanks a lot in advance,
Cheers, Luca