Lab 1 Assignment
Overview
These reading labs give you time to slow down, read carefully, and try the ideas yourself. In this first lab you will read three short lessons on how C++ stores values, what the fundamental built-in types are, and how to define values that should never change.
import std;. In this class, and in these labs, we will use #include (for example, #include <iostream>). Both are valid modern C++, and the learncpp reading also uses #include.Reading Assignment
Read the following lessons on learncpp.com. Each opens in a new tab.
Optional, if you want more depth: continue through the rest of Chapter 4 for the specific numeric and character types, and read 5.6 on constexpr variables.
What You Submit
A short written reflection on what you read. Your reflection must:
- A document with your name, 1 to 2 pages, Times New Roman 12 point, single-spaced.
- Explain, in your own words, the main ideas you took from the reading and how they connect to what we covered in lecture. There is no need to use AI, as you are not being graded on this, just effort.
- An appendix with screenshots is optional.
- If you have trouble, let us know, and you will still get the grade.
Grading
How to Submit
Upload your reflection as a PDF.
Appendix: Online C++ Compilers
Any of the tools below will run the reading examples in your browser, with no local setup (unless you want to). Remember to use #include online, not import std;.
Our course toolchain is GCC 15.2 with -std=c++26. Only Compiler Explorer lets you set that exact combination. The other tools run an older fixed compiler, which is fine for these basic examples.
- In the compiler dropdown, choose x86-64 gcc 15.2.
- In the Compiler options box, type
-std=c++26. - To run the program (not just compile it), open the Execution or Add tool > Executor pane.
- Use the Share button to get a link to your code.
- Select C++ from the language menu.
- Type your code and press Visualize Execution.
- Step forward and back to watch values change.
-std=c++26 here. That is fine for the basic examples.- Set the language (top right) to C++.
- Use the settings gear to pick the C++ standard.
- Press Run, or Debug to step through the code.
c++26. Fine for the basic examples.- Pick the newest GCC from the compiler list.
- Choose C++26 from the standard menu, or add
-std=c++26to the options. - Press Run, then Share for a link.