this post was submitted on 23 Oct 2021
6 points (100.0% liked)
C & C++
890 readers
9 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You use functions to extract code that does a specific thing to encapsulate it. So when you want to do a specific thing at three different places in your program, you don't need to write the same code three times but you call the function. It avoids redundancy and this is easier to maintain (only one place to fix stuff).
Yes, got itπ
___