vector<const string> not allowed?

S

Shafik

Hello folks,

Whats the reason for the STL not allowing this:

vector<const string> v = vector<const string>();


--Shafik
 
J

Jacek Dziedzic

Shafik said:
Hello folks,

Whats the reason for the STL not allowing this:

vector<const string> v = vector<const string>();

I would imagine that const strings cannot be assignable,
which is a requirement on types stored in std containers.

HTH,
- J.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,181
Messages
2,570,970
Members
47,536
Latest member
VeldaYoung

Latest Threads

Top