Gary Wessle wrote:
is it ok to do this? if not, then how
for (vector<pair<char,double::const_iterator it = v.begin(); it
!= v.end(); ++it) switch (*it->first){...
'it->first' is a char. You cannot dereference a char. You have one
too many indirections. Either use
switch (it->first) {
or
switch ((*it).first) {
Which should be the same AFA C++ is concerned.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask