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 » AMap::GetPut (k, v)
AMap::GetPut (k, v) [message #60063] Sun, 30 July 2023 13:06 Go to previous message
bozero is currently offline  bozero
Messages: 20
Registered: June 2018
Promising Member
I notice that GetPut(key, value) just cause assertion fail when the key is not in map, not like GetAdd(key, value) that will create new element in such case.
#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	StdLogSetup(LOG_FILE | LOG_COUT);
	VectorMap<String, int> vm;
	vm.GetAdd("getadd", 1); // ok
	vm.GetPut("getput", 2); // Assertion failed
}

 
Read Message
Read Message
Previous Topic: Vector
Next Topic: FormatE() with 0.0
Goto Forum:
  


Current Time: Tue May 14 09:01:00 CEST 2024

Total time taken to generate the page: 0.02232 seconds