{"id":28947241,"url":"https://github.com/chihebabiza/my-cpp-stack-array","last_synced_at":"2026-03-16T22:32:13.878Z","repository":{"id":300025696,"uuid":"1004963204","full_name":"chihebabiza/My-cpp-stack-array","owner":"chihebabiza","description":"A lightweight, template-based stack class built on top of the `clsMyQueueArr` class, which in turn uses a custom dynamic array (`clsDynamicArray`). This class provides basic stack behavior (LIFO – Last In, First Out) by inserting new elements at the beginning of the internal array.","archived":false,"fork":false,"pushed_at":"2025-06-19T13:05:11.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-19T14:19:30.162Z","etag":null,"topics":["cpp","cpp-library","data-structures","oop","stack"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chihebabiza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-19T12:54:47.000Z","updated_at":"2025-06-19T13:05:53.000Z","dependencies_parsed_at":"2025-06-19T14:29:46.887Z","dependency_job_id":null,"html_url":"https://github.com/chihebabiza/My-cpp-stack-array","commit_stats":null,"previous_names":["chihebabiza/my-cpp-stack-array"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chihebabiza/My-cpp-stack-array","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-stack-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-stack-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-stack-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-stack-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chihebabiza","download_url":"https://codeload.github.com/chihebabiza/My-cpp-stack-array/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebabiza%2FMy-cpp-stack-array/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268310796,"owners_count":24230185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp-library","data-structures","oop","stack"],"created_at":"2025-06-23T09:09:33.486Z","updated_at":"2026-03-16T22:32:08.853Z","avatar_url":"https://github.com/chihebabiza.png","language":"C++","readme":"# Stack Implementation Using Dynamic Array in C++\n\nA lightweight, template-based stack class built on top of the `clsMyQueueArr` class, which in turn uses a custom dynamic array (`clsDynamicArray`). This class provides basic stack behavior (LIFO – Last In, First Out) by inserting new elements at the beginning of the internal array.\n\n---\n\n## 📦 Features\n\n- LIFO stack behavior\n- Uses custom queue and dynamic array as a base\n- Supports viewing the top and bottom of the stack\n- Easy integration and extensibility\n\n---\n\n## 🧪 Example Usage\n\n```cpp\n#include \u003ciostream\u003e\n#include \"clsMyStackArr.h\"\n\nint main() {\n    clsMyStackArr\u003cint\u003e myStack;\n\n    myStack.push(100);\n    myStack.push(200);\n    myStack.push(300);\n\n    std::cout \u003c\u003c \"Top: \" \u003c\u003c myStack.Top() \u003c\u003c std::endl;     // 300\n    std::cout \u003c\u003c \"Bottom: \" \u003c\u003c myStack.Bottom() \u003c\u003c std::endl; // 100\n\n    // Since this extends clsMyQueueArr, you can also access other methods like:\n    myStack.Print(); // Output: 300 200 100\n}\n````\n\n---\n\n## 🧰 Public Methods\n\n| Method        | Description                                     |\n| ------------- | ----------------------------------------------- |\n| `push(value)` | Pushes a new item onto the top of the stack     |\n| `Top()`       | Returns the item at the top of the stack        |\n| `Bottom()`    | Returns the item at the bottom (oldest element) |\n| `Print()`     | Inherited – prints all items in stack order     |\n| `Size()`      | Inherited – returns number of items             |\n| `IsEmpty()`   | Inherited – checks if stack is empty            |\n| `Clear()`     | Inherited – clears all items                    |\n| `Reverse()`   | Inherited – reverses the stack order            |\n\n---\n\n## 🧱 Inheritance Structure\n\n```\nclsDynamicArray\u003cT\u003e\n       ↑\nclsMyQueueArr\u003cT\u003e\n       ↑\nclsMyStackArr\u003cT\u003e\n```\n\nEach layer adds additional functionality:\n\n* `clsDynamicArray` handles raw dynamic array operations.\n* `clsMyQueueArr` implements queue logic using `clsDynamicArray`.\n* `clsMyStackArr` overrides `push()` to behave like a stack.\n\n---\n\n## 📚 Use Case\n\nPerfect for:\n\n* Learning inheritance in C++\n* Understanding how stacks and queues can be built on top of arrays\n* Educational demos and exercises\n\n---\n\n## 🔧 Dependencies\n\n* `clsDynamicArray.h`\n* `clsMyQueueArr.h`\n\nInclude all related `.h` files and then import `clsMyStackArr.h` in your main project.\n\n---\n\n## 🧾 License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for full details.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchihebabiza%2Fmy-cpp-stack-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchihebabiza%2Fmy-cpp-stack-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchihebabiza%2Fmy-cpp-stack-array/lists"}