Homework 2, Feedback.

Notes

Answers

  1. What will happen when hw2a.cpp is compiled?
  2. What happened when hw2a.cpp was compiled with g++ -o hw2a hw2a.cpp
  3. Provide an example of a statement that produces a syntax error.
  4. What are the compiler warnings produced when using the command line flags to g++ and what do they mean?
  5. Why does how2a.cpp execute an infinite loop and how is this related to the shadow declaration warning?
  6. What caused the infinite loop in hw2b.cpp
  7. What does the command line flag -Wmisleading-indentation cause the compiler to report?
  8. How does make simplify the compiling process with respect to compiler flags?