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
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
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)
learnCpp/
├── src/
│ ├── Abstraction.cpp
│ ├── LargeNumber.cpp
│ ├── SpecialCharacter.cpp
│ ├── and.cpp
│ ├── array.cpp
│ ├── assign.cpp
│ └── ...
├── include/
│ └── ...
├── .vscode/
│ └── ...
└── README.md
You can compile and run the C++ files using any C++ compiler. Here's how to do it using g++:
-
Open a terminal or command prompt.
-
Navigate to the directory containing the
.cppfile. -
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! 🚀
```