Module 1 of 4
Introduction to C++
10 lessons · Setup, fundamentals, variables, I/O
Lessons
Topics covered
- Why learn C++ for engineering
- Overview of compiled vs interpreted languages
- C++ in industry and engineering applications
Topics covered
- Installing a C++ compiler on Windows and macOS
- Downloading Visual Studio Community edition
- Configuring the C++ workload
Topics covered
- Creating a new project in Visual Studio 2019
- Adding and managing .cpp source files
- Overview of the IDE layout
Topics covered
- Writing and running your first C++ program
- The main() function
- Compiling and executing code
- Common beginner errors
Topics covered
- Syntax rules and code structure
- Statements, expressions and semicolons
- Comments (single-line and multi-line)
- Header files and #include directives
Topics covered
- Stages of program execution: edit, compile, link, run
- Structured programming concepts
- Problem-solving and algorithm design
Topics covered
- Declaring and initialising variables
- Fundamental data types: int, float, double, char, bool
- Type sizes and ranges
- Constants and the const keyword
Topics covered
- Using cout for output
- Using cin for input
- The iostream library
- Escape sequences (\n, \t, etc.)
Topics covered
- Formatting output with setw, setprecision, fixed
- Using the iomanip library
- Left and right alignment
- Controlling decimal places in output
Topics covered
- Reading from files using ifstream
- Writing to files using ofstream
- Opening, reading, writing and closing files
- Error handling for file operations