Hot search terms: 360 Security Guard Office365 360 browser WPS Office iQiyi Huawei Cloud Market Tencent Cloud Store
programming tools Storage size: 37.05MB Time: 2022-02-10
Software introduction: Dev C++ was developed by Bloodshed. After the development was stopped in 2011, it was continued to be updated and developed by independent developer Orwelldevcpp...
Use and debugging of dev c++:
1. Debugging using breakpoints
If you cannot debug: Tools->Compile options->Code generation/optimization->Connector->Generate debugging information->change no to yes
Basic steps for debugging; 1. Change the release mode in the upper right corner to debug mode
2. Set breakpoints
3. Click Compile All and click the check mark.
(There are blue arrows indicating statements that have not yet been executed and are about to be executed, but there are more than one blue line. Variables can be viewed in two ways after debugging. ① Add view to enter the variable value and view ② Select a variable or expression and click Add View to see the variable value in the left column.) Of course, you can also observe the value of the variable through the terminal console;
Regarding the setting and viewing of loop statement breakpoints: Set breakpoints at the beginning and end of the loop, and you can view the progress of statement execution through the terminal.
Debugging buttons and functions;
Next step: execute the next statement and treat the function as a statement to directly give the result
Single-step entry: execute the next statement, and when a function is encountered, enter the function and execute it in a single step (the best way to observe the transformation of variables in loops and functions)
Skip: execute until the next breakpoint, if there is no next breakpoint, execute directly to the end
Common endpoint errors:
① Under normal circumstances (no bug), it will stop at the breakpoint and display a blue arrow. If there is a bug and the breakpoint is still red, it means that the return statement has not been executed, and the past statement will not be executed because the conditions are not met.
② Debugging error: When an invalid memory reference is executed, that is, an empty address is operated, or the array is out of bounds, an error will be reported.
For example, char a[100000000000] will report an error, because there is no such a large value at all, and it has far exceeded its own byte length, and an error will be reported during debugging. So char a[100] is fine. The table is that a has 100 characters. Each character can be written as 1000000000...one hundred.
Problems that arise during debugging:
1. When the scanf input cannot be performed during debugging, there must be a problem with the loop condition. Even an error message appears during debugging, indicating that there is a problem with the input statement. Please check the relevant knowledge here in time. ,
It may also be that the array is out of bounds, or it may be trapped in an infinite loop. Usually, it is caused by (loop statement, first execute i++ or the like, or execute loop while), so be careful.
2. When debugging the scanf function, be sure to write the next step (or single-step entry), enter the value in the terminal -> press Enter, and then enter the next step (single-step entry)
Usage problem: The code in dev C++ is caused by accidentally pressing insert. If you want to cancel, press insert again.
1.How to adjust Dev-C++ to Chinese?
If you miss the step of selecting the language during the initial installation, you will need to set it up after the installation is complete. The specific setting steps are as follows:
1. First open the devc++ software, you can see that it is all in English. Click Tools on the menu bar and select Environment Options in the menu to open the environment settings.
2. Next, click the drop-down box in the blue position of anguage that pops up, select Simplified Chinese, and press Enter to confirm.
3. After confirmation, the software will become the Chinese version.
It’s not difficult to set up. If you need it, just give it a try.
How does Tencent Computer Butler conduct a comprehensive physical examination? How does Tencent Computer Butler conduct a comprehensive physical examination?
How does the universal Wubi input method display typing speed? -How to display typing speed using the universal Wubi input method
How to hide the status bar in the universal Wubi input method? -How to hide the status bar with the universal Wubi input method
How to input special symbols using the universal Wubi input method? -How to input special symbols using the universal Wubi input method
How to set the skin for the universal Wubi input method? -How to set skin for universal Wubi input method
What to do if there is no sound after reinstalling the computer system - Driver Wizard Tutorial
How to practice typing with Kingsoft Typing Guide - How to practice typing with Kingsoft Typing Guide
How to upgrade the bootcamp driver? How to upgrade the bootcamp driver
How to change QQ music skin? -QQ music skin change method
Driver President Download-How to solve the problem when downloading driver software is very slow