why am i getting the wrong answer?i'm pretty sure everything is right
You should begin by getting rid of the notion that you're "pretty sure everything is right" and look for what isn't.
If a square object represents a 20 by 20 grid, why do you need a 20x20 two dimensional array of squares? Where do you even use b in main? Where does the stuff you read from the file in main actually make it into a grid?
[Edit: Your square type has absolutely no way to set the internal array's data to anything (including the constructor.) Doesn't that throw up a red flag for you? Why didn't you test this on a smaller grid where you know the answer?]
so how can i push the matrix to the array and find the four numbers?
You can begin by addressing the issues I pointed out in your code.
The Euler site is one where you are intended to do the work. You won't get much out of it if you are unable to test/debug your own code and are unwilling to do any research to solve the problem, and you will certainly not get much out of it if you have to go around asking for solutions.