Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Switch with String type variables
Switch with String type variables [message #3175] Tue, 09 May 2006 23:36 Go to next message
Justin is currently offline  Justin
Messages: 57
Registered: March 2006
Location: Orange County California
Member
If I want to use a switch statement with the 'String' type variable, I get this error message:


C:\MyApps\***\convert.cpp(33) : error C2450: switch expression of type 'String' is illegal
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called




Is there an equivalent in U++ for the Switch operator that can use a 'String' type value?


Justin
Re: Switch with String type variables [message #3176 is a reply to message #3175] Tue, 09 May 2006 23:45 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Justin wrote on Tue, 09 May 2006 17:36

If I want to use a switch statement with the 'String' type variable, I get this error message:


C:\MyApps\***\convert.cpp(33) : error C2450: switch expression of type 'String' is illegal
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called




Is there an equivalent in U++ for the Switch operator that can use a 'String' type value?


Justin



No, however, this is C++ language feature (only integral fundamental type can be used in switch expression).

Mirek
Previous Topic: about the behaviour of the Split() function
Next Topic: Header Issues[SOLVED]
Goto Forum:
  


Current Time: Tue Apr 23 22:41:08 CEST 2024

Total time taken to generate the page: 0.01847 seconds