I
icksa1
Hi:
I have a templated class, inside of which I declared another class, as
shown below:
template <class T, int n> class array
{
class subclass
{
};
};
When I try to declare a function that uses subclass as a return value I
get an error. For example:
template <class T, int n>
array<T,n>::subclass function()
{
}
int main()
{
return 0;
}
gives the following error:
main.cpp:4: error: expected constructor, destructor, or type conversion
before 'function'
Im using g++.
Any suggestions?
Thanks
I have a templated class, inside of which I declared another class, as
shown below:
template <class T, int n> class array
{
class subclass
{
};
};
When I try to declare a function that uses subclass as a return value I
get an error. For example:
template <class T, int n>
array<T,n>::subclass function()
{
}
int main()
{
return 0;
}
gives the following error:
main.cpp:4: error: expected constructor, destructor, or type conversion
before 'function'
Im using g++.
Any suggestions?
Thanks