Editors, Compilers, and IDEs
Code (and Plaintext) Viewers/Editors
Many different text/code editors are available for all of the different operating systems. You'll want to pick an helpful editor that color-highlights your code and helps with indentation. Also 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, 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').
Some recommended code/text editor options:
Also, ask your graduate TAs & undergraduate programming mentors what editor and/or integrated development environment (see below) they choose and why it's their favorite.
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++ 7.3 and llvm/clang++ 6.0 on Ubuntu 18.04. We understand that some of you may choose to use another compiler and development environment (e.g., Microsoft Visual Studio) for most of your work. We are asking you to write portable code (for g++/clang++) because it 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.
The good news is that the gcc/g++ compiler is available for every operating system, and you have a variety of different options for development environments. Note: Slightly different gcc 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 also 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. However, because clang is still under heavy development, it is somewhat less stable and portable to all operating systems and hardware. Thus we will still primarily use g++ for grading on the homework server.
Note on C++11/C++14/etc.: Many cool new C++ language syntax features were introduced with C++11/C++14. Not all operating systems/compilers support these new features out of the box (it is ok if your development environment does not support C++11 or C++14). 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. For example, to demonstrate knowledge and mastery of types, students should explicitly write the type and not use the auto keyword when declaring variables.
We have organized alot of information on the
C++ Installation Choices for Your Operating System.
C++ IDEs (Integrated Development Environments)
It's possible to do all of your work for this course with a simple text editor and command line compilation & running in a terminal. And many of us on the teaching staff prefer to code like this even for larger projects beyond this course!
Alternatively, you can do your work inside an Integrated Development Environment (IDE). Here are a few C++ development environments (similar to Visual Studio) that can be used with the GNU g++ or LLVM clang++ compilers. Note that the teaching staff many not be familiar with these specific tools and may not be able to help you if you get stuck.