char a[][4] = {{'a','a','a'},
{'a','a','a'},
{'a','a','a'},
{'a','a','a'}};
In c++ you must initialize the last index of an array.
In java if you do this it will result in an error.
Can someone explain me why??
Also when I check the length of array like this in java.
System.out.println(a[0].length);
the result is the length of the column in the array
lets says there is an '\0' at the end of array and when I check the length of array in c++ like this.
cout << strlen(a[0])
I get the length of an entire array.
Can I just get the lenght of the row or column in an array in c++ like in java?
Is this becuase array in java is an object?