using class (like with namespace)
I've got something like
1 2 3 4 5 6 7
|
class foo{
public:
typedef float value_type;
typedef std::valarray<value_type> vector;
private:
vector w;
};
|
In order to code its methods I need to do
1 2
|
foo::value_type foo::some_method(const vector &v ){
value_type result; //no need of qualification
|
So, ¿how could avoid having to type foo::
before parameters and return value?
I could
1 2 3
|
//foo.cpp
typedef foo::value_type value_type;
typedef foo::vector vector;
|
, ¿but what about private typedef/inner classes?
Just notice that the qualification is not needed in the parameters list (at least with gcc 4.6.1)
Maybe I don't care anymore, xP
Last edited on
Topic archived. No new replies allowed.