If you're going to use result like it's a one-dimensional array, then define it as such. Otherwise you should access the array like it's actually two dimensional: with a row and column index.