Topic: STL - scope (?) problems


Author: "Antsnio Fatela" <afatela@marktest.pt>
Date: 1997/09/05
Raw View
Hi,

The following code is legal?

I have tried it in VC 5.0 and doesn't work. It seems that there is a
problem with the default arguments (where instead of using
my_class::my_struct, it just use my_struct and of course it don't know what
it is). If I move my_struct outside my_class it works.

It compile fine with borland 5.01A.

#include <vector.h>

using namespace std;

class my_class
{
    public:

    struct my_struct
    {
        int a, b, c;
    };

    vector<my_struct> a;
    my_class() {}
    ~my_class() {}
};


--
Antsnio M Fatela                 E-mail: afatela@marktest.pt
MARKTEST                         Fax:    +351 +1 3535338
DT1 - Dpto. de Informatica       Phone:  3535371 - 3535418/21/36
Alameda Santo Antsnio dos Capuchos, N. 4 - 4
1100 Lisboa
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]