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++ MT-multithreading and servers » Witz and map variable
Re: Witz and map variable [message #38088 is a reply to message #37981] Fri, 30 November 2012 07:41 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Ha, I finally found the actual problem! Very Happy

It all goes down to the compiler, it decides that the 0 is not integer, but empty string on the line yn.Add(0,"NO") Smile So it saves it to the map with "" as key, not 0. To make this work, you have to cast the 0 to Value first:
	ValueMap yn;
	yn.Add(Value(0), "YES");
	yn.Add(1,"NO");


Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to close a Thread?
Next Topic: What's wrong with this code?
Goto Forum:
  


Current Time: Sat Jul 05 19:06:25 CEST 2025

Total time taken to generate the page: 0.03615 seconds