virtual void HandleMessage(const pp::Var& message) {
// is array condition
if (message.is_array()) {
PostMessage(pp::Var("I'm in is_array condition"));
// get the object
pp::VarArray array(message);
// get the first elemet of the Object, which is an array into a new array
pp::VarArray newArray = pp::VarArray(array.Get(0));
// Use the object and array
// the size of the object
int32_t arrayObjectSize = array.GetLength(); // important for the last job number 4 to loop and create the lenth variables for the 2 arrays
PostMessage(pp::VarArray(array));
PostMessage(pp::Var("the size of the object array: " + std::to_string(arrayObjectSize)));
int32_t newArraySize = newArray.GetLength();
PostMessage(pp::VarArray(newArray));
PostMessage(pp::Var("the size of the object array: " + std::to_string(newArraySize)));
PostMessage(newArray.Get(0));
int32_t size = 50;
int32_t unsortedArray[size];
for (int32_t i = 0; i < size; ++i){
unsortedArray[i] = newArray.Get(i);
}
}
}
job2.cc:104:35: error: assigning to 'int32_t' (aka 'int') from incompatible type 'pp::Var'
unsortedArray[i] = newArray.Get(i);
^ ~~~~~~~~~~~~~~~
> email to native-client-discuss+unsub...@googlegroups.com.
> To post to this group, send email to native-client-discuss@googlegroups.com.
> Visit this group at https://groups.google.com/group/native-client-discuss.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/native-client-discuss/PYKGHQG82gg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to native-client-discuss+unsub...@googlegroups.com.
To post to this group, send email to native-client-discuss@googlegroups.com.