An open API service indexing awesome lists of open source software.

https://github.com/makcoder-2004/advanced-cpp-sheet

The C++ Advanced Level Sheet repository provides practical examples to help developers master advanced C++ topics . With clear, concise code illustrations, it simplifies complex concepts, making it ideal for developers seeking to deepen their C++ knowledge through hands-on learning.
https://github.com/makcoder-2004/advanced-cpp-sheet

cpp

Last synced: 10 months ago
JSON representation

The C++ Advanced Level Sheet repository provides practical examples to help developers master advanced C++ topics . With clear, concise code illustrations, it simplifies complex concepts, making it ideal for developers seeking to deepen their C++ knowledge through hands-on learning.

Awesome Lists containing this project

README

          

# C++ Advanced Level Illustrative Codes

Welcome to the **C++ Advanced Level Illustrative Codes** repository! This repository contains a collection of well-explained examples and illustrations covering various advanced C++ concepts. Each example is designed to help you understand the functionality of each concept through practical code demonstrations.

## Topics Covered

This repository includes the following advanced C++ topics:

### **1. Ternary Operator**
- **Description**: Learn how to use the ternary operator (`?:`) to simplify conditional statements and make your code more concise.
- **Example**: An example is provided to showcase its use in decision-making.

### **2. Validation**
- **Description**: Examples demonstrating how to validate user input, handle invalid data, and ensure your program runs smoothly.

### **3. Bitwise Operators**
- **Description**: Explore the use of bitwise operators (`&`, `|`, `^`, `~`, `<<`, `>>`) to manipulate data at the bit level.
- **Examples**: Use cases for masking, toggling, and setting bits are included.

### **4. Functions**
- **Description**: Examples of both regular functions and advanced function features such as function overloading, default parameters, and recursion.

### **5. Static Variable**
- **Description**: Learn how to use `static` variables inside functions to retain values between function calls.
- **Examples**: Demonstrates the difference between static and non-static variables.

### **6. Printing & Formatting**
- **Description**: Comprehensive examples of output formatting using manipulators like `std::setw`, `std::setprecision`, and others for neat and organized output.

### **7. 2D Arrays**
- **Description**: Illustrates how to declare, initialize, and manipulate 2D arrays.
- **Examples**: Includes examples of iterating over arrays using loops.

### **8. Passing by Reference / Passing by Value**
- **Description**: Understand the differences between passing parameters by value and by reference.
- **Examples**: Highlights when to use each method and its impact on program behavior and performance.

### **9. Pointers**
- **Description**: Detailed examples on the use of pointers, pointer arithmetic, and how pointers relate to arrays.
- **Examples**: Covers null pointers and proper memory management techniques.

### **10. Dynamic Memory Allocation**
- **Description**: Learn how to use `new` and `delete` for dynamic memory allocation in C++.
- **Examples**: Demonstrates the creation of dynamic arrays and proper memory management.

### **11. Exception Handling**
- **Description**: Understand how to handle runtime errors gracefully using `try`, `catch`, and `throw` blocks.
- **Examples**: Includes examples of creating custom exceptions.

### **12. Dealing with Strings**
- **Description**: Examples of working with C++ strings (`std::string`) and character arrays.
- **Examples**: String manipulation techniques like concatenation, comparison, and searching.

### **13. Saving Data in Text Files**
- **Description**: Learn how to read from and write to text files using file streams (`fstream`, `ifstream`, `ofstream`).
- **Examples**: Demonstrates handling file input/output operations.

### **14. Local Date Time**
- **Description**: Examples of how to retrieve and format the current local date and time using the `chrono` library and other date/time functions.

## Repository Structure

Each topic is organized in a separate folder, containing:
- **A detailed explanation** of the concept.
- **One or more C++ code examples** illustrating the concept.

## How to Use

1. **Clone the repository**:
```bash
git clone https://github.com/your-username/cpp-advanced-illustrative-codes.git