+ 1

Can the expression evaluated by 'switch' be a string?

c++switch
30th Jun 2016, 6:26 PM
Christian Roos
Christian Roos - avatar
2 Answers
0
No it can't be string especially for c and c++ compilers, but you can use enum to solve your problem
31st Jul 2016, 5:08 AM
Anand Kumar
Anand Kumar - avatar
- 1
Yes
4th Jul 2016, 10:10 PM
Mihai Dancaescu
Mihai Dancaescu - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
I purchased a yearly subscription but it is not showing and money also got deducted... What I should do now?
0 Votes
Python
0 Votes
My code is not working
1 Votes
هل في عرب يساعدوني باساسيات البرمجة ولغة ال c++
1 Votes
Anyone have the same problem ? (Javascript Quiz about Function )
0 Votes
Where is the access to algorithmic information?
0 Votes
Ошибка в приложении для Андроид и не только ..
0 Votes
I am new trying to understand basics of PYTHON
0 Votes
I need help please 🙏
0 Votes
Program to calculate vowel in file
1 Votes
Follow us on Linkedin
Check out our facebook
See what we tweet about
Join our instagram
Watch our Youtube
HomeProFAQContactBug Bounty ProgramCareersTerms of UsePrivacy PolicySololearn Mobile
Made with
by  Sololearn | ©2023