Jump to content

[SOLVED] array quesiton


photo

Recommended Posts

Posted

hi 

  Is there any way to assign an array? example

 

ObjectMeshSkinned meshs[0];

 

void create_scene(ObjectMeshSkinned newmeshes[])

{

   meshs.copy(newmeshes);  //work

   meshs=newmeshes;   //doesn't work

 

  }

}

 

ok. i should use .copy 

Posted

Hi,

 

You are right, copy() is preferable way to copy arrays. However, you can also do it manually:

target_array.clear();
forloop(int i = 0; source_array.size()) {
   target_array.append(source_array[i]);
}

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...