adplus-dvertising
frame-decoration

Question

What is the correct syntax for declaring an allocator?

a.

template < class T > class allocator;

b.

template < class T > class;

c.

template class allocator;

d.

None of the mentioned

Answer: (a).template < class T > class allocator;

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the correct syntax for declaring an allocator?