r/learnprogramming • • Apr 05 '22

Name one programming/comp sci concept you never understood and if you understand it, try to explain it to them

Name a programming concept such as virtual functions, pointers, certain algorithms, etc that you always had a hard time understanding and why.

Someone else who reads yours and does understand it, try to explain it to them to help them learn

1.6k Upvotes

738 comments sorted by

View all comments

Show parent comments

1

u/gabrielsfarias Apr 06 '22

But in your example only the repeating arguments would be the overload right? So these 3 functions have 1 overload (int x)?

2

u/plastikmissile Apr 06 '22

It doesn't matter if the arguments repeat or not. As long as the signatures are different. So you can't have:

foo(int x) {}
foo(int y) {}

Since they both use one int argument (what it's called doesn't matter).