Click here to Skip to main content
15,071,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello guys. I am writing a simple rpg in c++ and am trying to create a getMap function which returns a 2d array of chars. however I am haveing a bit of trouble in finding the best way of doing this. I figured the most efficient way would be to take in a poiner as a parameter and fill it up with the array elements but am clueless as to how to do this. Could anyone give us a hand?

Thanks,
Posted
Comments
mbue 24-Sep-11 10:42am
   
For the definition:
RGP == role playing game
Char == Avatar or NPC
Do you mean this?
Are you using COM-Interfaces? Or virtual classes for your chars?
Legor 27-Sep-11 3:30am
   
i think char was meant to be a datatype here ^^

1 solution

Take a look at this page[^] in MSDN for guidance. However, depending on your requirements you may find it better to use one of the STL classes, such as map[^].
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900