In my program I have the following statements void Person::setTitle(const Glib::ustring& str) { switch ( str ) { case "None" : { title = title_t::None; break; } case "Dr" : { title = title_t::Dr; break; } ...... case "Rabbi" :{ title = title_t::Rabbi; break; } case "Shaykh" :{ title = title_t::Shaykh; break; } default : { title = title_t::None; break; } }// switch }//Method
when compiling I get an error code that reads: ==== error: switch quantity not an integer ==== Which is true, but according to http://newdata.box.sk/bx/c/htm/ch07.htm#Heading54 the error is unwarranted, since the parameter received by the method and later on given to the switch statement for scrutiny is a valid C/C+ + statement [setTitle(const Glib::ustring& str)] Can anyone shed some light to this problem? _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus