Skip to main content
edited body
Source Link
kzidane
  • 17.7k
  • 3
  • 28
  • 100

You don't really need to have an array to store bricks. Once you create and add a brick to the window, it stays there until you remove it using the function named removeGObjectremoveGWindow() from the SPL library passing to it a reference to that brick after you get that reference returned by detectCollisio().

I guess the error you're getting is because you're declaring the array and specifying its size with a variable that's not guaranteed to be initialized though.

You don't really need to have an array to store bricks. Once you create and add a brick to the window, it stays there until you remove it using the function named removeGObject() from the SPL library passing to it a reference to that brick after you get that reference returned by detectCollisio().

I guess the error you're getting is because you're declaring the array and specifying its size with a variable that's not guaranteed to be initialized though.

You don't really need to have an array to store bricks. Once you create and add a brick to the window, it stays there until you remove it using the function named removeGWindow() from the SPL library passing to it a reference to that brick after you get that reference returned by detectCollisio().

I guess the error you're getting is because you're declaring the array and specifying its size with a variable that's not guaranteed to be initialized though.

Source Link
kzidane
  • 17.7k
  • 3
  • 28
  • 100

You don't really need to have an array to store bricks. Once you create and add a brick to the window, it stays there until you remove it using the function named removeGObject() from the SPL library passing to it a reference to that brick after you get that reference returned by detectCollisio().

I guess the error you're getting is because you're declaring the array and specifying its size with a variable that's not guaranteed to be initialized though.