class Material(){..}
class MaterialLoader(){
...
LoadMaterial(const char *path, Material *materials[] ){...}
} The wierd thing is, when the LoadMaterial function is called from another class like this: Material **materials = NULL;
MaterialLoader ml;
int num_materials = ml.LoadMaterial(path, materials);
printf("adress of materials is %x\n", materials);
the printf points to 0! The array is getting filled within the function, debugging the application as well as printf statements inside LoadMaterial confirm this. It is as though a copy is being made of materials, and that this is being passed to the function, but that's not possible, is it? And yet it must be, since that seems to be what is happening. Can someone shed some light on this? If you want to compile the code, it can be obtained from http://code.google.com/p/mll/ Thanks in advance.