Home » U++ Library support » U++ Core » [SOLVED] Vector Bug
[SOLVED] Vector Bug [message #52565] |
Tue, 22 October 2019 13:47  |
 |
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
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 20:41:24 CEST 2025
Total time taken to generate the page: 0.03264 seconds
|