Login Page - Create Account

Support Board


Date/Time: Wed, 12 Mar 2025 11:36:30 +0000



Post From: Vector losing it's value ACSIL (need persistent vector)

[2024-12-24 13:16:44]
User431178 - Posts: 613
I have implemented the examples from the sierra website

Check it again, your code is missing an important part of the linked example.
In your code, you are always starting with an unintialized vector pointer (undefined behaviour as it may or may not be null etc).
You need to actually get the persistent pointer to use it after you first initialize.

This is wrong:
std::vector<double>* InbLines;

Instead it should be:
std::vector<double>* InbLines = static_cast<std::vector<double>*>(sc.GetPersistentPointer(1));


In the example, this is the equivalent line:
ClassA * p_ClassA = (ClassA *)sc.GetPersistentPointer(1);