Skip to content

muhammadwali0/cpp-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C++ Lab

Documenting my journey through C++, moving from high-level abstractions toward performance-oriented systems programming.

This repository serves as a log of my progress as I map my existing programming logic into the C++ ecosystem, focusing on memory efficiency and low-level control.


Section 1: Basics

  • Simple Programs: Establishing the boilerplate. Breaking down the C++ execution model, headers, and the entry point main() function.
  • Using an Operator: Mapping familiar arithmetic and logical operations into C++ syntax, focusing on type-specific behavior.
  • Reading Input from the Keyboard: Transitioning to std::cin and stream-based I/O for interactive console applications.
  • Two Control Statements: Implementing core logic via if and for. Applying familiar branching and iteration patterns within the C++ type system.
  • Using Blocks of Code: Managing local scope and memory lifetime through the explicit use of curly braces {}.
  • Introducing Functions: Modularizing logic. Moving from Python/Java methods to C++ functions, with an eye on return types and signature definitions.
  • The C++ Keywords: Navigating the reserved word-set to understand language-specific constraints and compiler instructions.
  • Identifiers: Standardizing naming conventions for variables and functions to maintain a clean, readable codebase.

Section 2: Data Types and Operators

  • Data Types & Literals: Exploring the physical memory footprint of C++ primitives. Differentiating between hard-coded values (literals) and dynamic storage.
  • Variables: Managing named memory locations with strict static typing and explicit initialization.
  • Arithmetic Operators: Mastering the core mathematical operations, including the nuances of integer division and the modulus operator %.
  • Relational and Logical Operators: Implementing boolean logic using &&, ||, and !. Leveraging short-circuit evaluation for performance-optimized branching.
  • Assignment & Compound Assignments: Utilizing shorthand notation (+=, *=, etc.) for concise, efficient state updates.
  • Type Conversion & Casts: Navigating implicit promotions and explicit static_cast<type>() to manage data precision and prevent overflow in quantitative calculations.
  • Spacing and Parentheses: Refining code readability and ensuring correct operator precedence to eliminate logic errors in complex expressions.

More to come...

About

These are all the programs I personally made to go from an absolute beginner to an advanced programmer of C++ Programming Language.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages