Original Post
What does and unhandled exception and assertion error actually mean? In visual studio, when i run the game in debug mode, it always returns an unhandled exception access violation error at this part:
void CBrickManager::generateBallData()
{
for(int i = 0; i = (m_numBricks - 1); i++)
{
//////////////////////////
//ROW 1
//////////////////////////
//POS
//x values
m_brickList.pos.x = (80 * i) + 224;//the error occurs at this line.
//y values
m_brickList.pos.y = (384 - 100) - m_brickHeight;
//z values
m_brickList.pos.z = 0.0f;
//VEL
m_brickList.vel.x = 0.0f;
m_brickList.vel.y = 0.0f;
m_brickList.vel.z = 0.0f;
//VISIBILITY
m_brickList.visible = true;
}
}
Could my array have anything to do with the error? In the header, this is what it looks like: Brick m_brickList[10]; Brick is a struct that holds data on the bricks:
struct Brick
{
D3DXVECTOR3 pos;
D3DXVECTOR3 vel;
bool visible;
};
Could you guys help me out? I tried replacing the dot with '->' when i use an array, but then i just get compile errors.