1. Create a new c program (if you have already read 2 directly)
- Click "File" in the upper right corner and click "New".
Click "Project" and select "win32 Console Application".
Name and confirm.
Select "an empty project".
3. Click New to create a "C++ Source File".
Name the file.
3. Write a simple code,
compile and
link
execution
2 possible errors
1 Compilation is successful but link error
Solution:
1 It is possible that the program is running and the compiler cannot rewrite the file. Open the task manager to see if there is a process for the file. If so, end it.
Task Manager: Ctrl+Shift+Esc.
3. Run as an administrator (the solution is the best)
2. It may be that the directory configuration is incorrect when compiling, but I still don't know how to solve it [dog head]
2. Create a new c++ file in the same project, but it prompts that the link is wrong.
Reason: A project in C language can only have one main function.
Solution: Create a new project or delete the original file.