Solve this please....

What is the mistake which should be remove to work the following program ok.Remember the class userDetails is templated and for this the error is shown by the compiler is "userDetials" is not a type.
1
2
3
4
5
6
7
userDetails<string,int> *objUserDetail;  
int a;
cin>>a;
    objUserDetail=new userDetails[a];
    for(int i=0;i<a;i++)
    objUserDetail[a].display();
    


On the other side i have this code which is working fine but the class is not templated.
1
2
3
4
5
6
7
upload *obj;
    int a;
    cin>>a;
    obj=new upload[a];
    for(int i=0;i<a;i++)
    obj[i].get();
    
This line
objUserDetail = new userDetails[a];
should be
objUserDetail = new userDetails<string, int>[a];
Last edited on
Thanks peter solved.
Topic archived. No new replies allowed.