View Single Post
Old 06-01-2006, 03:58 PM   #10 (permalink)
Manan
Registered User
 
Join Date: Jul 2005
Posts: 16
Manan is on a distinguished road
Matrix as reference parameters

Well, I've got the template system to work properly and generate a correctly filled-in grid. Now, I'm going to remove one number at a time, and check to see if it is solvable after each number is removed. If it isn't solvable, go back and put the number back in.

I'm constantly getting an error when I try to pass a matrix as a reference parameter. Here is my code:
Code:
void FillPossibilities(int &Buffer[9][9])
When I do this I get the following error:
error: declaration of 'Buffer' as array of references

Why can't I pass the matrix as a reference parameter? Is there something wrong with my syntax? Or, is it possible to return a matrix from a function? Any help is greatly appreciated.
Manan is offline   Reply With Quote