Search:

Type: Posts; User: Click_here

Search: Search took 0.01 seconds.

  1. Fair enough.

    Fair enough.
  2. Do you mean that a conversation about an int will...

    Do you mean that a conversation about an int will differ from a char?
  3. What do you mean by that?

    What do you mean by that?
  4. Also, I think that that is fine - Because we are...

    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...
  5. A pointer to a 2D array?

    A pointer to a 2D array?
  6. A good sense of humour is not lost on me :P

    A good sense of humour is not lost on me :P
  7. Just for completeness - Can you think of an...

    Just for completeness - Can you think of an advantage to using a pointer to a 2D array?
  8. Why doesn't that terminology work?

    Why doesn't that terminology work?
  9. Besides a bit more work - What are the...

    Besides a bit more work - What are the disadvantages of treating a pointer to a 2D array like a pointer to a 2D array?
  10. It was a hypothetical, so I'm not going to dwell...

    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...
  11. Hypothetically: If you had a pointer to an int,...

    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...
  12. I suppose the best way to explain why I think it...

    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} ,
    ...
  13. And to ask me to provide an example where it is...

    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...
  14. I think that the int (*multip)[5][5]; ...is...

    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...
  15. Note that removing the '&' gets rid of the...

    Note that removing the '&' gets rid of the warning.
  16. Apologies - Yes it is. Because this...

    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...
  17. Or better yet, a pointer to a 2D array with 5x5...

    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},
    ...
Results 1 to 17 of 17