Jump to content

[SOLVED] Array as function argument


photo

Recommended Posts

i'm still confused how to send a array to a function.

say i have array

ObjectMeshSkinned meshes[];

and i want to send to function

void create_scene(ObjectMeshSkinned skinMeshes[]) {
}

when i do this, it give me error 

Interpreter::parse_expression(): arrays can't be used in expressions

 

so how could i do this? 

 

Link to comment

ObjectMeshSkinned meshes[] defines a map, not an array. Try ObjectMeshSkinned meshes[0] instead for defining an array. Nevertheless both variants should be passable as function arguments and your function definition also seems to be correct. Maybe the error is related to some other code section, posting your complete/more code might help to detect the cause of the error message.

Link to comment
×
×
  • Create New...