First off, its been awhile since I've had to post hereI'm well into my first year of university taking computer science. I am already teaching a study group on saturday's and I'm highest over-all out of about 400 students.
So I got this struct:
struct Cell {
int iLife;
};
Class member:
Cell m_pBoard[50][50][50];
Now the program works fine like this. There is NO memory allocation, pointer manipulation, nothing special. I never do anything funky to m_pBoard, it is always accessed like: m_pBoard[x][y][z].iLife for example.
If I change the struct, even a bit:
struct Cell {
int iLife;
int iLife2;
}
The entire program runs into Segmentation faults, SDL deploys its parachute, I get a pointer access error. However it is apparently all stuff which the SDL and OpenGL can continue to render around... Altho since the Board of Cells is messed up it doesn't look very well.
Honestly, I can post the entire code if you want but I promise, the array m_pBoard is only used in a few loops, and only iLife is ever accessed in a normal fashion. I think it has to do with the 3D Array.
Any tips? Any advice? I haven't had a problem this stubborn in a long time.




I'm well into my first year of university taking computer science. I am already teaching a study group on saturday's and I'm highest over-all out of about 400 students.
Reply With Quote