P
pavan734
Hi,
I need small help. Suppose if u have two stl queues like
queue<int> q1,q2 ;
Then u can compare the two queues like
if(q1 ==q2)
{
.........
}
But Suppose if the queue is templatized over user class like
queue <user_class> q1,q2 ;
Then the statement
if(q1 ==q2) ...... is not working.
What should I make in the user_class for the above statement to work.
I think I have to overload == operator. Can anyone help me.
I need small help. Suppose if u have two stl queues like
queue<int> q1,q2 ;
Then u can compare the two queues like
if(q1 ==q2)
{
.........
}
But Suppose if the queue is templatized over user class like
queue <user_class> q1,q2 ;
Then the statement
if(q1 ==q2) ...... is not working.
What should I make in the user_class for the above statement to work.
I think I have to overload == operator. Can anyone help me.