Skip to content

Latest commit

Β 

History

History
124 lines (85 loc) Β· 2.64 KB

README.md

File metadata and controls

124 lines (85 loc) Β· 2.64 KB

learnCpp πŸ“˜πŸ’»

A beginner-friendly C++ programming repository designed for students, self-learners, and anyone revisiting C++ fundamentals.

πŸ‘©β€πŸ’» Created by Sakiba Belal
πŸŽ“ Department of Software Engineering, NSTU


πŸ“š About This Repository

This repository contains practical C++ code examples and exercises to help learners understand and apply core C++ concepts. It's ideal for:

  • πŸ§’ Absolute beginners to C++
  • πŸ‘©β€πŸŽ“ University students (e.g., NSTU) learning C++
  • 🧠 Self-learners revisiting C++ after a gap
  • πŸ’Ό Interview preparation for C++ roles

πŸ’‘ Topics Covered

The repository includes examples on:

  • βœ… Basic syntax and structure
  • βœ… Variables and data types
  • βœ… Control structures (if-else, loops)
  • βœ… Functions and recursion
  • βœ… Arrays and strings
  • βœ… Object-Oriented Programming (OOP)
    • Classes and objects
    • Inheritance
    • Polymorphism
    • Encapsulation
  • βœ… File I/O operations
  • βœ… Memory management (pointers, references)
  • βœ… Standard Template Library (STL)

πŸ—‚οΈ Folder Structure


learnCpp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Abstraction.cpp
β”‚   β”œβ”€β”€ LargeNumber.cpp
β”‚   β”œβ”€β”€ SpecialCharacter.cpp
β”‚   β”œβ”€β”€ and.cpp
β”‚   β”œβ”€β”€ array.cpp
β”‚   β”œβ”€β”€ assign.cpp
β”‚   └── ...
β”œβ”€β”€ include/
β”‚   └── ...
β”œβ”€β”€ .vscode/
β”‚   └── ...
└── README.md


πŸ’» How to Run

You can compile and run the C++ files using any C++ compiler. Here's how to do it using g++:

  1. Open a terminal or command prompt.

  2. Navigate to the directory containing the .cpp file.

  3. Compile the code:

    g++ filename.cpp -o outputname

4. Run the compiled program:

   ```bash
   ./outputname
   ```

Alternatively, you can open the files in an Integrated Development Environment (IDE) like **Visual Studio Code**, **Code::Blocks**, or **CLion** and run them directly from there.

---

## 🧠 Sample Code

Here's a simple example demonstrating the use of arrays in C++:

```cpp
// array.cpp
#include <iostream>

int main() {
    int arr[] = {1, 2, 3, 4, 5};
    for(int i = 0; i < 5; i++) {
        std::cout << "Element " << i << ": " << arr[i] << std::endl;
    }
    return 0;
}
```

---

## 🎯 Learning Objectives

By exploring this repository, you will:

* Understand the fundamental concepts of C++
* Gain hands-on experience with coding exercises
* Prepare for academic exams and interviews
* Build a solid foundation for advanced C++ topics

---


## πŸ’¬ Feedback

If you have any questions, suggestions, or feedback, feel free to open an issue or contact me directly.

Happy coding! πŸš€

```