Use of class template
-
I have this problem. A class I am using has
using namespace std
within a included header. My problem is that this class has parameters named "list" (of type string) and "vector" (float[3]) which will cause a class template error. Rather than rename the parameters or remove 'using namespace', is there something else that I can do? Thanks --- -
I have this problem. A class I am using has
using namespace std
within a included header. My problem is that this class has parameters named "list" (of type string) and "vector" (float[3]) which will cause a class template error. Rather than rename the parameters or remove 'using namespace', is there something else that I can do? Thanks ---Rather than rename the parameters or remove 'using namespace', is there something else that I can do? No, but removing
using namespace
should cause no problems: simply delete this line (which is a big no-no in header files) and prefix every name belonging in the standard library withstd::
. It's as simple as this. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo