i am loading in a binary file into a 2d vector. i have it working but don't understand how it works! lol
here is the code....
when i declare value1 as "int value1" if i don't add the little array bit at the end it will not load the correct value when i use the load.read(), but i don't understand why. could someone please explain it to me???? or point me to a site that will help me understand it better? Also if anyone can explain why i have had to use pointers in this code, i can use them a little, but do not understand them yet! lol
vector <vector<int> > mapdata;
mapxsize = *widthb;
mapysize = *heightb;
// this is to determine how big the map is.
for (int i = 0; i < mapxsize; i++)
for (int j = 0; j < mapysize; j++)
mapdata[i][j] = *value1;
Thanks for any help u can give....