Resources for CS 2040
- Replit C++
Environment: a simple way to run short C++ programs, especially
if you are having problems with CodeLite or the VM.
- cplusplus.com: a great
reference for C++. However, this material likely only makes sense if you
have already read the textbook - it presumes you are already familiar
with much of C++. Stack Overflow is not particularly helpful for this
course because that presumes an even greater understanding of C++. SO
rarely contains full explanations of answers, making it difficult for
beginners to know if an answer really applies to their situation.
- Using Codelite
- Multi-file Codelite Projects
- Setting up the the CS 2040 VM
for C++ development
- If opening files is not working in CodeLite:
- Right click on your project and select Settings...
- In the General group, scroll down to Working
Directory and set it to
$(WorkspacePath)/
. Then, press
the tab key.
- If you have not done so, select the Compiler tab and
set C++ Compiler Options
to
-g;-O0;-Wall;-std=c++17
. Again, press
the tab key.
-
You might go back and check the Working Directory in
the General tab - it is very easy to not save your changes.
- Click OK
You can now place the files in the top level directory of the
workspace. That is, if your workspace is named myspace
, put
your files in the same folder that contains myspace.workspace
.
- Setting up a git repository on your VM
- C++ Compiler errors and fixes
- Debugging 201: Debugging segmentation
faults in C++