Connecting Tech Pros Worldwide Help | Site Map

A question about typedef and classes and templates..

JustSomeGuy
Guest
 
Posts: n/a
#1: Jul 19 '05
template <class Type>
class myclass
{
public:
typedef struct
{
Type a;
Type b;
} myclassType;

// The rest of the class
};


So my question is I have a template vector class and I want to
declare a vector<myclassType> with Type being double.
How do I declare the vector properly?

TIA
B.


Mike Wahler
Guest
 
Posts: n/a
#2: Jul 19 '05

re: A question about typedef and classes and templates..



"JustSomeGuy" <nope@nottelling.com> wrote in message
news:bkgj9m$htc$1@nserve1.acs.ucalgary.ca...[color=blue]
> template <class Type>
> class myclass
> {
> public:
> typedef struct
> {
> Type a;
> Type b;
> } myclassType;
>
> // The rest of the class
> };
>
>
> So my question is I have a template vector class and I want to
> declare a vector<myclassType> with Type being double.
> How do I declare the vector properly?[/color]

vector<myclass<double>::myclassType> vec;



-Mike


Closed Thread