Skip to main content

To write your code for this course you can use a simple code editor or a complete Integrated Development Environment. If you don't already have a favorite, we suggest several options below. Chat with the TAs and mentors in lab and office hours for recommendations and to get help with installation, customization, and best practices of your developement environment.

Code (and Plaintext) Viewers/Editors

The minimal option is an editor that color-highlights your code and helps with indentation. Some recommended code/text editor options include:


IMPORTANT: Note that use and display of "newlines" in plaintext files is not standardized on UNIX/GNU Linux platforms vs. Windows. There are several characters that are used to represent end-of-line/carriage return. We will always use '\n' (newline) in this course. This is the UNIX/GNU Linux way. Please do not use '\m' or '\r' in this course, as it won't match the output we are expecting on the homework submission server. In order to examine the provided code & sample output & your own output, you'll want to make sure you find a text viewer/editor that correctly displays newlines ('\n').

 

C++ Compilers

You may do your programming work for this course with any C++ compiler and development environment you wish, but your submitted homework code must compile and run on gcc/g++ 11.4 and llvm/clang++ 14.0 on Ubuntu 22.04. Learning to write portable code (for g++/clang++) is good programming practice and it allows us to significantly streamline the grading process for your TAs. This leaves more time for us to give constructive feedback on programming style, individual tutoring, and debugging help.

gcc/g++ and/or clang/clang++ compilers are available for every operating system, and you have a variety of different options for development environments. Note: Different gcc/g++ or clang/clang++ compiler version numbers are ok -- you will probably not notice any differences. (Be sure to do a practice submit of your homework early enough each week to allow time to correct compilation issues.)

We recommend the clang/LLVM compiler, which has earned much praise for having clear and concise compiler error messages that are especially helpful for new C++ programmers. Once setup on your system, you simply substitute "clang++" for "g++" when you compile your program.

Note on C++11/C++14/C++17/C++23/C++26/etc.: Many cool new C++ language syntax features were introduced with C++11, C++14, and beyond. Not all operating systems/compilers support these new features out of the box (it is ok if your development environment does not support the bleeding edge technologies). Similarly, many large long-term or legacy open-source and commercial software projects cannot or choose not to use use some of the newest features. We will avoid making use of these new features in most code examples and homework assignments for the course. Similarly, we ask that students limit the use of these features on their homework and tests to avoid portability issues or other confusion during grading. Some advanced features will not be allowed; for example, to demonstrate knowledge and mastery of types, students should explicitly write the type and not use the auto keyword when declaring variables. Please ask on the Discussion Forum if you are unsure about whether you can use a specific syntax or function.

We have organized alot of information on the
C++ Installation Choices for Your Operating System.

 

C++ IDEs (Integrated Development Environments)

You are encouraged to do your work for this course using an Integrated Development Environment (IDE), and become familiar with the tools of modern software development. Note that the teaching staff many not be equally familiar with each of these tools and every operating system. Please ask for help from multiple TAs/mentors if you have questions about installation, customization, and best practices.