Home > Backend Development > C++ > body text

How Can I Enable C 0x (or C 11) Features in Dev-C ?

DDD
Release: 2024-11-28 02:05:14
Original
965 people have browsed it

How Can I Enable C  0x (or C  11) Features in Dev-C  ?

Overcoming the Obstacle of Enforcing C 0x in Dev-C : A Guide to Changing Compilation Modes

Encountering the error message, "range-based-for loops are not allowed in C 98 mode," signifies that the compiler is operating in a mode that does not support the desired C 0x features, including the range-based loop. This article delves into the necessary steps to change Dev-C 's compilation mode to one compatible with C 0x.

Altering the Compiler Options

  1. Navigate to the "Tools -> Compiler Options" menu.
  2. Select the "Compiler" tab.
  3. Locate the checkbox labeled, "Add the following commands when calling the compiler."
  4. Enter "-std=c 11" or "-std=C 0x" into the text entry box.

Additional Notes

  • The exact path and labeling may vary slightly depending on the version of Dev-C you are using.
  • If the specified command does not work, try disabling and then re-enabling the compiler options to apply the changes.

By following these steps, you will have successfully changed the compilation mode in Dev-C to one that supports C 0x features, enabling you to utilize the range-based loop and other benefits of this language standard.

The above is the detailed content of How Can I Enable C 0x (or C 11) Features in Dev-C ?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template