How to instantiate container like list or queue?

  • Thread starter Thread starter Jeff0803
  • Start date Start date
J

Jeff0803

Guest
I'm trying to instantiate container like following.

list<int> l = new list<int>();

or

queue<int> q = new queue<int>();

However compile error occur like following

Error C2440 'initializing': cannot convert from 'std::queue<int,std::deque<_Ty,std::allocator<_Ty>>> *' to 'std::queue<int,std::deque<_Ty,std::allocator<_Ty>>>'
How to do this?

Continue reading...
 
Back
Top