3 ms·
Depends on what you mean by "effectively." If you wanna, say, do an exhaustive search over all 4-dimensional integer vectors in a rectangular region, and print
by klyrs 6y ago
Depends on what you mean by "effectively." If you wanna, say, do an exhaustive search over all 4-dimensional integer vectors in a rectangular region, and print off the ones that satisfy some relationship, you don't need pointers (nevermind what printf and string literals are doing under the hood). It's a wonderfully beefy desktop calculator, in that way. But for most applications, pointers are pretty much necessary.
- WalterBright 6y agoArrays in C (once passed to functions) are pointers, even when they use array syntax: https://www.digitalmars.com/articles/C-biggest-mistake.html https://www.digitalmars.com/articles/C-biggest-mistake.html
- klyrs 6y agoYou don't need arrays for the code I was describing: it's a nested for-loop on 4 ints. But, yeah, that's a really common mistake.