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 » [SOLVED] Vector Bug
[SOLVED] Vector Bug [message #52565] Tue, 22 October 2019 13:47 Go to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
Hello community,

let's assume this code :
#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	Vector<String> vector1;
	
	String& r = vector1.Create("hello");
	Cout() << r << EOL;
	
	String& r2 = vector1.Create("hello2");
	Cout() << r2 << EOL;
	
	r = "test";//Crashing here
	Cout() << r << EOL; 
}


my code crash at r ="test" statement.
Is it a bug ?!

this kind of thing works :
Array<String> vector1;
	
	String& r = vector1.Create<String>("hello");
	Cout() << r << EOL;
	
	String& r2 = vector1.Create<String>("hello2");
	Cout() << r2 << EOL;
	
	r = "test";
	Cout() << r << EOL;


Thanks in advance
Best regard.

[Updated on: Tue, 22 October 2019 14:52]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: S_type and ValueMap
Next Topic: How to serialize a new data type
Goto Forum:
  


Current Time: Thu May 02 18:28:51 CEST 2024

Total time taken to generate the page: 0.02541 seconds