diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..3bfd08335f0826401c088f9a4c1f0528b1e9edf2 --- /dev/null +++ b/README.en.md @@ -0,0 +1,33 @@ +This project aims to provide a simple implementation of smart pointers for C++ development. It includes basic functionality of `shared_ptr` and `unique_ptr`, helping manage dynamically allocated objects and prevent memory leaks. + +## Installation + +Ensure you have a C++ compiler and CMake installed. Clone this repository to your local machine: + +```bash +git clone https://gitee.com/cpp-thinkmore/cpp-smart-ptr.git +cd cpp-smart-ptr +``` + +Build the project using CMake: + +```bash +mkdir build +cd build +cmake .. +make +``` + +## Usage + +The project provides implementations of smart pointers. You can find `shared_ptr.hpp` and `unique_ptr.hpp` in the `include/smart_ptr` directory. Include these header files in your C++ code to use the smart pointer features. + +See the example code in `src/main.cpp`. + +## Contribution + +Contributions of code or suggestions to improve this project are welcome. Please submit a Pull Request or Issue on Gitee. + +## License + +This project is licensed under the MIT License. See the LICENSE file in the repository for details. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4cb55e0bc5d0cb300caed91b82b1210cb9a3cb05 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +该项目旨在提供一个简易的智能指针实现,适用于C++开发。它包含`shared_ptr`和`unique_ptr`的基本功能,有助于管理动态分配的对象,避免内存泄漏。 + +## 安装 + +确保你已安装C++编译器和CMake。克隆本仓库到本地: + +```bash +git clone https://gitee.com/cpp-thinkmore/cpp-smart-ptr.git +cd cpp-smart-ptr +``` + +使用CMake构建项目: + +```bash +mkdir build +cd build +cmake .. +make +``` + +## 使用 + +项目提供了智能指针的实现,你可以在`include/smart_ptr`目录下找到`shared_ptr.hpp`和`unique_ptr.hpp`。在你的C++代码中包含这些头文件以使用智能指针功能。 + +示例代码请查看`src/main.cpp`。 + +## 贡献 + +欢迎贡献代码或提出建议以改进该项目。请提交Pull Request或Issue在Gitee上。 + +## 许可证 + +该项目遵循MIT许可证。详情请查看仓库中的许可证文件。 \ No newline at end of file