int[][] arr = new int [4];
Error 1 Cannot implicitly convert type 'int[]' to 'int[][]' D:\CODING\Visual Studio 2012\ConsoleApplication5\ConsoleApplication5\Program.cs 13 27 ConsoleApplication5
5 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Pankaj Kumar ChoudharyPosted Jun 19, 2015, 8:39 PM
int n;
for (int i = 0; i < 4; i++)
{
Console.WriteLine("Enter Number of Element for Arr{0}", i + 1);
int.TryParse(Console.ReadLine().ToString(), out n);
arr[i] = new int[n];
}
Ramesh MaruthiPosted Jun 19, 2015, 9:47 AM
Julin JamesPosted Jun 19, 2015, 8:58 AM
Upendra Pratap ShahiPosted Jun 19, 2015, 8:44 AM
Bhushan BhasmePosted Jun 19, 2015, 8:23 AM