|
question on classes
ok how would i access the arrays in this class?
if my object is named maze1
why doesnt this work maze1.datamap
[sourc]
maze1.randomizemaze(maze1.datamap,10);
[/source]
I believe that datamap and map are both private members of the class. This means that you cannot directly access it outside the class.
To do this, you could write a member function (make sure it''s a public function) that returns your datamap / map arrays.
To do this, you could write a member function (make sure it''s a public function) that returns your datamap / map arrays.
By default, class members are private. You could write an access method, as suggested above, or just make them public.
~~~~~~~~~~
Martee
~~~~~~~~~~
Martee
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
so is this right because i get an access violation when i run it
|
ok this is the most complex crap with classes to get working,
now if the following is correct which i assume it is
how would i tell my function to utilize datamap and map like so
now if the following is correct which i assume it is
how would i tell my function to utilize datamap and map like so
|
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement