Page 1 of 1

array of Materials.

Posted: Mon Feb 09, 2004 2:06 am
by Epsilon
hi, i have an error when i compile that i dont understand, maybe you can help me.

the error is in the line:
buffer->Material = MaterialList[Index];

MaterialList is an array of pointers to SMaterials, that is passed in a function.
core::array<video::SMaterial>* MaterialList

the error is:
error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class irr::core::array<struct irr::video::SMaterial>' (or there is no acceptable conversion)

i think this says which the class array cant return the class SMaterial, or something like this.

thanks.

Posted: Wed Feb 11, 2004 12:55 pm
by Guest
:)

really easy - you should write

Code: Select all

if (MaterialList)
  buffer->Material  = (*MaterialList)[Index];
Look carefully and you will get what the problem is in two seconds I think :)
It's not an advance help, so, please post such questions into the beginners section :P

Posted: Wed Feb 11, 2004 2:45 pm
by Epsilon
thanks but the problem is already solved :D
i changed the class in the array from SMaterial to MaterialGroup and found.