Wednesday, March 15, 2017

C++ Part 25

Functions

  • Breaks code down into manageable chunks to write (and divide across development team)
  • Easier to debug – only one idea behind each module
  • Easier to maintain – buggy modules may be replaced without worrying about ramifications on other modules
  • Outsiders only need to know a module’s interface, not the details of its implementation.
  • Avoids duplication of code ⇒ more compact, and also easier to modify if code has bug  
  • Predefined functions: e.g., String.length(): String → Int  
  • Programmer-Defined functions: used similarly to predefined functions  

    This predefined functions need using namespace std;

Source : Absolute C++



No comments:

Digital Design Part 3

4th→ assembler translates it to the machine language. 1.6 [20] <§1.6> Consider two diļ¬€erent implementations of the same instru...