A question about typedef and classes and templates..

J

JustSomeGuy

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.
 
M

Mike Wahler

JustSomeGuy said:
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?

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



-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top