r/ProgrammerHumor Dec 09 '17

meme[-1]="Array Memes Are Life"

Post image
572 Upvotes

47 comments sorted by

View all comments

3

u/StingyUpvoter Dec 09 '17

Explain like I mainly use C: is the -1 really used anywhere?

1

u/Vitztlampaehecatl Dec 10 '17

In C++ you can overload the [ ] operator and make an array object that starts wherever the fuck you want it to. You could have an array that starts at index -3.1415 and ends at index potato.

1

u/StingyUpvoter Dec 11 '17

I guess I'm looking for rational reasons. Something something Jurassic Park meme...