C++ doesn't support switch-case on strings. Furthermore you're again missing a .toString()