Hello,
I am currently working on a project where I need to pass an array of numbers from TypeScript to C++. I couldn't find any clear documentation or examples related to this.
typescript:
let numArray: number[] = [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 ];
cpp:
std::vector parser(std::vector input){
for (int i = 0; i < input.size(); i++)
{
input[i]++;
}
return input;
}
I would like to know how I can pass this numArray to a C++ function and access its elements.
Questions:
Is there any recommended method to do this?
Are there any data type constraints or considerations I should be aware of while passing the array?
Any guidance or reference to documentation would be greatly appreciated. Thank you in advance!
Hello,
I am currently working on a project where I need to pass an array of numbers from TypeScript to C++. I couldn't find any clear documentation or examples related to this.
typescript:
let numArray: number[] = [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 ];
cpp:
std::vector parser(std::vector input){
for (int i = 0; i < input.size(); i++)
{
input[i]++;
}
return input;
}
I would like to know how I can pass this numArray to a C++ function and access its elements.
Questions:
Is there any recommended method to do this?
Are there any data type constraints or considerations I should be aware of while passing the array?
Any guidance or reference to documentation would be greatly appreciated. Thank you in advance!