¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

COMP 206 Unit 2: Making and Using Objects

Adriana Vincelli-Joma COMP 206 University-level C++ Inglés 51 fichas

Fichas del conjunto (51)

  1. 1source codeeasy for human to understand
  2. 2machine instructioncode executed on computer
  3. 3preprocessorsimple program that replaces patterns in source code with other patterns
  4. 4preprocesor directivespatterns used to save typing and to increase readability of code
  5. 5parsesbreaks code into small units and organizes it into a tree
  6. 6global optimizerused between first and second passes to produce smaller, faster code
  7. 7code generatorcreates assembly code or machine code
  8. 8assemblerruns assembly code
  9. 9peephole optimizerlooks for pieces of code containing redundant assembly-language statement
  10. 10linkercombines list of object modules into executable program that can be loaded and run by OS
  11. 11librarycollection of object modules in single file
  12. 12librarianprogram that creates and maintains libraries
  13. 13type checkingtests for proper use of arguments in functions and prevents many kinds of programming errors
  14. 14static type checkingtype checking occurs during compilation; maximizes execution speed
  15. 15dynamic type checkingtype checking at runtime
  16. 16interpretertranslates source code into activities and immediately executes activities
  17. 17compilertranslates source code directly into assembly language or machine instructions
  18. 18separate compilationpieces of program combined into final executable program by linker
  19. 19source-level debuggershows exactly what is happening in program by tracing its progress through source code
  20. 20in-memory compilationkeep compiler program in RAM
  21. 21compilation process1. run preprocessor on source code
    2. first pass: pareses pre-processed code; compiler performs type checking
    3. second pass: code generator walks through parse tree and generates assembly/machine code
    4. assembler runs code; end result is object module
    5. peephole optimizer looks for redundant assembly language
    6. linker combines list of object modules into executable program
  22. 22functionspieces of code that can be placed in different files; enabling separate compilation
  23. 23argumentsvalues you'd like function to work with during execution
  24. 24return valuevalue that function hands back to you as result
  25. 25declaration- introduces name (identifier) to compiler
    - declare variable/function in many different places
    - memory is not allocated
  26. 26definition-allocates storage for name
    -only one definition in C or C++
    -definition can also be declaration
  27. 27example of function declarationint func1(int, int);
  28. 28example of function definitionint func1(int length, in width) { }
  29. 29externdefinition is external to file; definition occurs later in file
  30. 30header filefile containing external declarations for library
  31. 31file extension for C++ header file.h
  32. 32example of including C++ header file- #include
    -#include "local.h"
    - #include
  33. 33angle brackets- < >
    -preprocessor searches for file in way that is particular to your implementation
    -"include search path"
  34. 34double quotes-" "
    -preprocessor searches for file in "implementation defined way"
    -search for file relative to current directory
  35. 353 steps required to use library in C++ program1. include library's header file
    2. uses functions and variables in library
    3. link library into executable program
  36. 36include statement to use iostream header file#include
  37. 37namespace-wraps each set of C++ definitions in library/program
    -prevents collision if some other definition has identical namespace
  38. 383 things that make up fundamentals of program structure1. variables: holds data used by program
    2. function definition
    3. function call: program control is transferred to called function
  39. 39compile command for Hello.cppg++ Hello.cpp -o Hello.exe
  40. 40concatenation-pasting character arrays together into a single character array
  41. 41iostream for keyboard input-cin
    -operator: >>
  42. 42iostream for keyboard output-cout
    -operator: <<
  43. 43—header file required to read and write files
  44. 44header file implicitly included when you use fstream
  45. 45ifstream-input stream; behaves like cin
    -opening file for reading
  46. 46ofstream-output stream; behaves like cout
    -opening file for writing
  47. 47getline()allows you to read one line into string object
  48. 48whilereads every line in input file and sends each line to output file
  49. 49templatecreate class of anything
  50. 50vectorsequence containers representing arrays that can change in size
  51. 513 ways vector is container-push_back: add brand-new element to end of vector
    -insert(): member function to put something in middle of container
    -push_front: put things at beginning

Información

Descripción
University-level C++ COMP 206 Fichas sobre COMP 206 Unit 2: Making and Using Objects, creado por Adriana Vincelli-Joma el 05/06/2021.
Visitas
2
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?