Hacker News new | past | comments | ask | show | jobs | submit login

Of course multidimensional arrays are an important part of the language, just as the ability to have structs inside structs.

> The above code looks like it's indexing into an array of pointers. If you want a flat array, make a few inlined helper functions that do the multiplying and adding. Your code will be much cleaner and easier to understand.

It is a "flat" array already, not an array of pointers: [0]. No need to write the code that compiler generates for you already.

[0] https://godbolt.org/z/x3cPf3TvT




I am aware that it's flat already.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: