Presentation is loading. Please wait.

Presentation is loading. Please wait.

Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because.

Similar presentations


Presentation on theme: "Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because."— Presentation transcript:

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

2 Visual C++ (v6)

3 New..Ctrl+N

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

5 Visual C++ (v6)

6 New source file will be included in the project

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

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 By double clicking on the error message, you can go to the line containing the error. There is a variable which is forgotten to be declared before used.

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 Chose line Put break point Start debugging with “F5” or Build->Start Debug->Go

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

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”


Download ppt "Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because."

Similar presentations


Ads by Google