glDrawElements and Face indices

hi
i was working on a program that dynamically allocates a multidimensional array in the form of a pointer-to-pointer (**) to store the face indices for glDrawElements(), however when I try to use the pointer -to-pointer for the fourth parameter in glDrawElements() nothing shows up on the screen. I have also tried statically allocating a multidimensional array (not a pointer-to-pointer) to store the face indices and it works, and both the dynamically allocated array and the statically allocated array are the exactly same, so i'm very confused as to what to do.
So can someone please help me?

here is a sample of the code that doesn't work:

Quote:/*Model is the name of a class which reads the mesh file and allocates the
necessary memory*/
Model mesh_file;

//Get_Faces() is a member function of Model that returns an unsigned char** of indices
unsigned char** faces = mesh_file.Get_Faces();

//Get_Vertices is a member function of Model that returns a float* of vertex coordinates
float* vertices = mesh_file.Get_Vertices();
int main()
{

You can't use pointer-to-pointer multidimensional arrays for glDrawElements, it needs to a flat block of memory. Statically allocated multidimensional arrays in C are nothing like pointer-to-pointer arrays and far more like unidimensional arrays.

hey,
me again,
I tried all three suggestions and I inched a little closer to getting it to work but I am still having one small problem. I decided to use integers instead of unsigned characters (since I would probably be using more than 11 vertices in my program and unsigned characters can't store values greater than 10) and I tried using glGetError() to shed some light on the situation, but instead of helping me, it actually crashes the program.
As for my problem, nothing shows up on screen when I try to use GL_INT for the type parameter of glDrawElements() and I dont quite know why this happens and its not just with glDrawElements(). I also noticed that anytime I try using integers with any OpenGL routine, it doesn't seem to work. For example, when I try changing the color with glColor3i() it doesn't work, so I was wondering if anyone can help me with this problem or at least offer some suggestions

So this is what the code looks like currently:

Code:

/*Model is the name of a class that reads the mesh file and allocates the necessary memory*/
Model mesh_file;

//Get_Faces() is a member function of Model that returns an int* of indices
int* faces = mesh_file.Get_Faces();

//Get_Vertices() is a member function of Model that returns a float* of vertices
float* vertices = mesh_file.Get_Vertices();

//suppose to draw mesh
/*Get_Face_Element_Count() is a member function of Model that returns the total number of indices*/
glDrawElements(GL_POLYGON,mesh_file.Get_Face_Element_Count(),GL_INT,faces);
return 0;
}

OK,
so is there any way to call glDrawElements() with integer values?
And by the way I actually tried using unsigned characters instead of integers with the new piece of code and it still doesn't work , so actually I am still lost.