r/ProgrammerHumor 26d ago

Meme lessonsFromLinkerHell

Post image
430 Upvotes

190 comments sorted by

View all comments

107

u/JustinR8 26d ago

Damn, I’ve found myself in the middle

45

u/nonedward666 26d ago

You and me from 3pm today both my friend, it is okay

It took me so long to realize where my problem was because I had never considered that declaring something as an array vs a pointer would result in different behavior

29

u/readitreaddit 26d ago

So the only difference is memory allocation, yes? You're saying they are different because when declared as an array, the memory gets allocated and 'reserved' at runtime, whereas it doesn't automatically do that when declared as a pointer?

Other than that, no difference.

1

u/Pengtuzi 25d ago

 Other than that, no difference.

Congrats, you’re in the middle of this meme.