Problems with pointers to arrays of objects.

Started by
13 comments, last by Radagar 21 years, 6 months ago
oh yeah.. heheh. Thanks.
Advertisement
Try this:

void draw_map(CTile pMap[][]);

...or is it

void draw_map(CTile[][] pMap); ?

I forgot, I never use static array anymore.

My compiler generates one error message: "does not compile."
My compiler generates one error message: "does not compile."
You know what, make yourself comfortable using multiple pointers and dynamic allocation memory, that''s gonna save your life.
My compiler generates one error message: "does not compile."
Thanks for the replies everyone, although I''m still pretty confused =)

It''s working great right now with the CTile array stored in a CMap class, and passing a pointer to that CMap the the draw_screen function.

All is good now.

~~~~~~~~~~~
Chris Vogel
~~~~~~~~~~~
WyrmSlayer RPG - In Early Development
quote:Original post by Radagar
I really prefer to keep the multi-dimensional array.

Why not go for a more C++ solution and create your own class for your two-dimensional arrays?

Arguing on the internet is like running in the Special Olympics: Even if you win, you're still retarded.[How To Ask Questions|STL Programmer's Guide|Bjarne FAQ|C++ FAQ Lite|C++ Reference|MSDN]

This topic is closed to new replies.

Advertisement