I. Configure development tools
1.ModifyCodeFont size and background color
1.1Select"Tools"Of"Option"
1.2 the Options dialog box appears, select " font and color " to adjust the font style and background color.
2. Add code line number
Select"Option"Under"Text Editor"MediumC #, The following dialog box is displayed:
SelectedRow numberIf you want the code to automatically wrap, you can also selectAutomatic line feed.
Create a project
Learn how to create a console applicationProgramThe steps are as follows:
1.File-----New-----Project
2.Click project, the following dialog box appears, select"Console application"Template
Modify Project name: Console exercise
Location: select the folder directory of the project.
Solution name: syntax Learning
3.Click OK. The following code page is automatically generated by the compiler:
Generation and Tracking Errors 1. Generate a project
The compiler provides the function of generating a project to detect the syntax errors of the code before the code runs, facilitating program robustness.
Procedure1: Click Generate In the toolbar. "Console exercise" (project name)
2: Observe the status bar generation prompt
After you click Generate, the system prompts that the generation is successful.CTRL + F5Run the program.
2. Auxiliary Function of error message
An error occurs after generation, such:
when a syntax error occurs in the code, the code shows a red wavy line such as the 14 line, double-click the error message. The cursor will automatically jump to the vicinity of a statement that may have an error. You can modify it according to its description.