0.4 Introduction to C++ development Flashcards
(9 cards)
What are the basic steps of how C++ programs get developed?
- Define the problem to solve
- Design a solution
- Write a program that implements the solution
- Compile the program
- Link object files
- Test program
- Debug
What characteristics do good solutions to problems have?
- They are straightforward (not overly complicated or confusing).
- They are well documented (especially around any assumptions being made or limitations).
- They are built modularly, so parts can be reused or changed later without impacting other parts of the program.
- They can recover gracefully or give useful error messages when something unexpected happens.
bug
any kind of programming error that keeps the program from operating correctly
debugging
the process of removing bugs
source code/code
the set of instructions that we input into a text editor or coding software
code editor
a text editor that is designed for programming
What are the advantages of using a code editor over a text editor?
- Line numbering makes it easier to find your mistakes
- Syntax highlighting and coloring make it easier to identify the different parts of your program
- Unambiguous, fixed-width fonts make it easier to tell similar letters apart and to organize your lines of code
Each source code file in your program needing to be saved to disk means that…
You will need to name all your files
What should the first/primary source code for a program be called?
main.cpp
main makes it easy to know where the primary source code file is, and .cpp is the file extension for a C++ source code file