Fair enough.
Type: Posts; User: Click_here
Fair enough.
Do you mean that a conversation about an int will differ from a char?
What do you mean by that?
Also, I think that that is fine - Because we are not discussing the size of the 2D arrays, nor the data type.
What we are discussing is whether using a pointer to a 2D array has any advantages...
A pointer to a 2D array?
A good sense of humour is not lost on me :P
Just for completeness - Can you think of an advantage to using a pointer to a 2D array?
Why doesn't that terminology work?
Besides a bit more work - What are the disadvantages of treating a pointer to a 2D array like a pointer to a 2D array?
It was a hypothetical, so I'm not going to dwell on it too much.
Also, I don't think that a car is a good comparison. Pointers and non-pointers need to be "driven" differently -> Like driving a...
Hypothetically: If you had a pointer to an int, and you could (somehow) create a way of using it where you didn't have to dereference - Would you want to?
I don't mean create another variable and...
I suppose the best way to explain why I think it is better is using the code from before
int multid[5][5] = {
{0, 1, 2, 3, 4} ,
...
And to ask me to provide an example where it is "better" is asking for my opinion as fact.
I think that it is always better to treat it exactly as it is intended -> A pointer (can be seen with the...
I think that the
int (*multip)[5][5];
...is better - Because it is more descriptive.
It defines multip as a pointer to an array of 5 to an array of 5
It is a pointer to a 2d array by...
Note that removing the '&' gets rid of the warning.
Apologies - Yes it is.
Because this results in a warning
C:\Project Euler\Sketch\main.c||In function 'main':|
C:\Project Euler\Sketch\main.c|26|warning: assignment from incompatible...
Or better yet, a pointer to a 2D array with 5x5 elements...
int multid[5][5] = {
{0, 1, 2, 3, 4} ,
{5, 6, 7, 8, 9},
...