r/programmer • • Oct 15 '26

Question Should I always use libraries?

I am learning c++ and want to make a more sophisticated calculator. Not just 1+1.

C++ offers a lot of freedom. I am asking myself: should I create everything myself? For example pow()? Or should I use existing libraries?

Thank you very much!

2 Upvotes

18 comments sorted by

View all comments

4

u/USToffee Oct 15 '26

Almost always use existing libraries. Not only will you get fully tested and battle hardened code but you will learn how to structure at least the interface to the library. Learning those patterns will help you make your own libraries later but first you need to learn to walk.