our environment n.
Skip this Video
Loading SlideShow in 5 Seconds..
Our Environment PowerPoint Presentation
Download Presentation
Our Environment

Loading in 2 Seconds...

play fullscreen
1 / 29

Our Environment - PowerPoint PPT Presentation

Download Presentation
Our Environment
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Our Environment • We will exercise on Microsoft Visual C++ v.6 • because that is what we have in the univ. • but there are many free compilers, too.

  2. Visual C++ (v6)

  3. Visual C++ (v6) New.. Ctrl+N

  4. Visual C++ (v6) projecttitle (name of .exe) Project and file directory Choose: “Win32 Console Application”

  5. Visual C++ (v6)

  6. Visual C++ (v6) New source file will be included in the project

  7. Visual C++ (v6) Give a file name with extension .c Choose: “c++ source file”

  8. Visual C++ (v6) Write your program here

  9. Visual C++ (v6) Compile the C file

  10. Visual C++ (v6) Build an executable (.exe) file.

  11. Visual C++ (v6) Run the executable file (.exe). When this menu is selected, even if the compiling was not complete, it will re-compile. Error and warning messags will be here.

  12. Visual C++ (v6) Program output and interface at DOS prompt.

  13. Visual C++ (v6) Open a previously created project.

  14. Visual C++ (v6)

  15. Compiler structure

  16. Program generation steps

  17. Error investigation There is a variable which is forgotten to be declared before used. By double clicking on the error message, you can go to the line containing the error.

  18. Debugging Add an integer variable with name “a”

  19. Linker errors A function with name “print” is not defined.

  20. The correct one should be printf

  21. Execution error

  22. The correct usage of printf for writing out numbers

  23. Debugger

  24. Until now, you should have encountered programming mistakes. Use debugger: Build->set active configuration-> win32 debug

  25. Insert breakpoint Put break point Chose line • Start debugging with “F5” or • Build->Start Debug->Go

  26. Debug screen Debug toolbar Current running line Functions Stack Variables watching

  27. Run line by line by pressing “F10” or clicking this button Trace variable values here

  28. Move mouse over the variable name, and see the current values

  29. To execute and skip to the next breakpoint, press “F5”