Ticketing system | Sololearn: Learn to code for FREE!

0

Ticketing system

i am considering using functions or structures for my ticketing system assignment, which is more useful?

c++

12/17/2019 2:30:52 AM

Daniel

1 Answer

New Answer

+4

Functions can always do more than structures. But, structures are easier to understand. Therefore, if all of your design aspects can be handled by structures, that should be your top choice. Your next choice could be to combine them both into a class. This tends to be easier to understand over a pure functional approach. However, a tiny single function is better than multiple structures or class. Sometimes, coding multiple ways is needed to find the simpliest design. Other times, you can estimate the final complexity with minimal planning.