cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Three dimensional array of struct
Three dimensional array of struct
May 28, 2011 at 9:04am UTC
Skagen
(10)
Here is my struct:
1
2
3
4
5
6
struct
Tile {
// Values
int
base;
int
object; };
Here is the function:
1
2
3
4
5
int
setup_map() {
return
0; }
Now I want that whenever that function is called, the variable tilemap is freed and then defined again. It will be a three dimensional array containing Tiles. When it is declared I want it to be populated from some source. How to do this?
May 28, 2011 at 9:21am UTC
hamsterman
(4538)
http://www.cplusplus.com/forum/articles/17108/
The article discusses various methods of implementing multidimensional arrays.
Topic archived. No new replies allowed.