Original Post
How do I pass an array to a function. I tried this:
but but that crashed my computer. What am I doing wrong?
"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila."
-Mitch Ratliffe
void Cgraphics::changeAmbient(float *new_values)
{
for(int i = 0;i<sizeof(ambientlight);i++)
{
ambientlight[i]=new_values[i];
}
}
|