vamsi krishna wrote:
I tried this and It worked for me on g++ (3.4.4).
#include<list> using namespace std;
std::list
P; /*I tried for list template, it should work for pair also*/ typedef class P* Y; typdef std::list<Y> P_new; /*P_new is the class what u are expecting.*/
Unfortunately it doesn't quite work though it took me a while to work
out why: I hadn't thought of declaring a class inside the brackets <...>.
There are two classes P here I think: one declared but not defined and
the other defined as std::list