Troubleshooting Compiler Support for Range-Based For Loops in Dev-C
Working with range-based for loops requires compiler support that may not be enabled by default in Dev-C . To resolve this issue, follow these steps:
-
Navigate to Compiler Options: Click on "Tools" in the top menu and select "Compiler Options."
-
Select the "Compiler" Tab: In the Compiler Options window, switch to the "Compiler" tab.
-
Enable Advanced Compiler Commands: Locate the checkbox labeled "Add the following commands when calling the compiler." Check this box to activate the text entry field below.
-
Enter Compiler Flag: In the text entry box, input "-std=c 11" to specify that the compiler should use the C 11 standard. If that doesn't work, try "-std=C 0x" instead.
-
Apply Changes: Click "OK" to save the changes. Your compiler will now support range-based for loops and other features of C 0x.
The above is the detailed content of How to Enable Range-Based For Loops in Dev-C ?. For more information, please follow other related articles on the PHP Chinese website!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn