-
|
Hi, This below is the not working code and the error I get no matter if i use float or float3 as type in the "backinblack" std::vector: Error: |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 3 replies
-
|
You are mixing up data types. The vector you have is a |
Beta Was this translation helpful? Give feedback.
-
|
I am not sure I understand the question though. Do you want to split the vector If the you want the latter this should work: // Send the host_vector back to std::vector<std::vector<float>>
std::vector<std::vector<float>> backinblack{std::vector<float>{float3_vector.begin(), float3_vector.end()}};This creates a vector of vector via direct-list initialization of a single vector that in turn is created from the range [float3_vector.begin(), float3_vector.end()) |
Beta Was this translation helpful? Give feedback.
I am not sure I understand the question though. Do you want to split the vector
float3_vectorinto multiple smaller arrays, or do you want to just add it tobackinblack?If the you want the latter this should work:
This creates a vector of vector via direct-list initialization of a single vector that in turn is created from the range [float3_vector.begin(), float3_vector.end())