Entry a array in c block

Hi ,

I try to define a input array for c block module.
A add on propriety of block this statment : double a={0,1,2}.
In C++ template the variable appear but when try to run the simulation i get the following message
image
what is wrong?
Thanks,
David

Hi, David.

If I understand correctly, you are trying to pass an array as an attribute. If so, that’s not supported. You’ll need to pass the values as individual attributes. Or you could set the attribute as a string (e.g., char* a=“0,1,2”) and parse the string into values inside the C++ code.

Was that the question?

–robert

1 Like

Hi Robert,

Yes! This is exactly the question. Thank you very much for answer.
I will use the char and then parse in c code.
Thank you again.

David