C ++ program development

How to effectively develop a modular program in C ++? How to study?

+3
source share
4 answers

For beginners, you might want to do brute force:
1. Write a simple function mainin one file.
2. Add some functionality, then compile the test.
3. Refactoring (use this keyword on Google).

Here are a few refactoring recommendations (not all of them can be applied at the same time):

  • Duplicate functions must be divided into another function.
  • Duplicate functions must be put in a separate source file and a common one.
  • The structure of the code and data that a common topic should be placed in a single module.
  • , , .
  • .

. , -. . Test Driven Development - .

+3

About the only answers to that question, which may even hope to fit into the answer here, there will be advice on books to read .

+1
source

Source: https://habr.com/ru/post/1748299/


All Articles