0
using System;    
public class UserMainCode  
{   
	//Assume following return types while writing the code for this question.        
	public static int[][] output1 = new int[9][];    
	public static void soduko()
	{
	}
	public static void SolveSudoku(int[,] input1)       
	{   
	
input1=new int[9,9];  
	int i,j;
	for(i=0;i<9;i++)
	for(j=0;j<9;j++)
	output1[i,j]=input1[i,j];
	soduko();
	
	
		//Write code here       
	}  
}

im getting error CS0022 Wrong number of indices inside[]; expected 1

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Momerath
1

You've declared output1 as a jagged array ([][]) instead of a 2D array ([,]) but in line 16 you are trying to access it as a 2D array. I'd change output1 to a 2D array as you'll have more work to do if you want to use it as a jagged array (you haven't allocated any array space for it in this code snippet).

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.