{"id":27404757,"url":"https://github.com/ninja-vikash/learn-cpp-as-newbie","last_synced_at":"2025-04-14T05:47:11.423Z","repository":{"id":242249027,"uuid":"809063538","full_name":"Ninja-Vikash/Learn-CPP-As-Newbie","owner":"Ninja-Vikash","description":"Are you looking for a short guide for learning C++ with core stuff of programming. Your are in the right place. Read this comprehensive repo to learn C++ 🤓","archived":false,"fork":false,"pushed_at":"2024-07-18T14:44:20.000Z","size":393,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-18T18:41:47.854Z","etag":null,"topics":["array","booleans","cpp","loops","string","variables"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ninja-Vikash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-06-01T15:27:19.000Z","updated_at":"2024-07-18T18:41:56.415Z","dependencies_parsed_at":"2024-07-18T18:54:56.381Z","dependency_job_id":null,"html_url":"https://github.com/Ninja-Vikash/Learn-CPP-As-Newbie","commit_stats":null,"previous_names":["ninja-vikash/cpp","ninja-vikash/learn-cpp-as-newbie"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ninja-Vikash%2FLearn-CPP-As-Newbie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ninja-Vikash%2FLearn-CPP-As-Newbie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ninja-Vikash%2FLearn-CPP-As-Newbie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ninja-Vikash%2FLearn-CPP-As-Newbie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ninja-Vikash","download_url":"https://codeload.github.com/Ninja-Vikash/Learn-CPP-As-Newbie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830418,"owners_count":21168272,"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","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":["array","booleans","cpp","loops","string","variables"],"created_at":"2025-04-14T05:47:09.284Z","updated_at":"2025-04-14T05:47:11.412Z","avatar_url":"https://github.com/Ninja-Vikash.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learn C++\n\n### Introduction\n\n***\n\u003cimg src=\"assets/c++.png\" width=\"130\" align=\"left\"\u003e\n\nC++ is a very popular **programming language**.\u003cbr/\u003e\nC++ can be used to create **high-performance** applications.\u003cbr/\u003e\nC++ is a **cross-platform language**.\nC++ was developed by **Bjarne Stroustrup** in 1979.\u003cbr/\u003e\n\nC++ gives programmers a high level of control over system resources and memory.\u003cbr/\u003e\nThe language was updated 4 major times in 2011, 2014, 2017 and 2020 to `C++11`, `C++14`, `C++17`, `C++20`.\n\n### Why use C++?\n\n- C++ is one of the world's most popular programming language.\n- C++ can be found in today's `Operating systems`, `Graphical User Interfaces`, and `Embedded systems`.\n- C++ is an `Object-Oriented` Programming language which gives a clear structure to programs and allows code to be reused, lowering development costs.\n- C++ is portable and can be used to develop applications that can be adapted to mutliple platforms.\n\n\u003e [!IMPORTANT]\\\n\u003e **Difference between C and C++**\n\u003e\n\u003e C++ was developed as an extension of C, and both language have almost the same syntax.\u003cbr/\u003e\n\u003e The main difference between C and C++ is that C++ support `classes` and `objects`, while C does not.\n\n## Getting Started 🚀\nTo start coding with C++, we need two things:\n- A text editor like `Visual Studio Code`, `code::block`\n- A compiler like `GCC` with `MingW`\n\n### Setup MingW in machine\n**Open any browser and search for `MingW download`**\n![alt text](\u003cassets/mingw download.png\u003e)\n\n**Download the `mingW` setup from the official site and install**\n![alt text](assets/sourceforge.png)\n\n\u003e [!NOTE]\\\n\u003e Don't touch directory options let it be default\n\n**After installation tick packages**\n![alt text](assets/manager.png)\n\nMake sure you have selected `mingW32-base` and `mingW32-gcc-g++` \n\nApply changes from Installation\n\n\u003e [!IMPORTANT]\\\n\u003e **Set path variable**\\\n\u003e Search in your machine for `system variable`\\\n\u003e Update `user variable` --\u003e `path`\\\n\u003e Add a new path for `bin` directory which is inside `MingW` and paste it in path variable.\n\u003e ```\n\u003e C:\\MinGW\\bin\n\u003e ```\n\n### To check MingW environment working or not!\nOpen bash and run the commands \n```bash\ngcc --version\n\ng++ --version\n```\n\n***\n### Create first C++ program\nIn VS code create a file with name as `firstprogram.cpp`\n```cpp\n#include\u003ciostream\u003e                      // Header file\nusing namespace std;                    // Standard library\n\nint main(){\n    cout \u003c\u003c \"Hello World!\";             // Code for print message\n    return 0;\n}\n```\n\nFor running the code open terminal window in VS Code and run the command\n```bash\ng++ firstprogram.cpp\n```\nIt will create a new file as `a.exe`\u003cbr/\u003e\nThis `a.exe` file contains the actual program we have written.\u003cbr/\u003e\nFor running this file use the command line as\n```bash\n.\\a.exe\n```\nOr `a` + `tab` it will auto complete.\n\n**Don't Worry**! 😀\u003cbr/\u003e\n*We are not going to use this method instead we will use a code runner extension.*\n\nAnd press the `play button` at the top right corner of the window.\n\n\u003e [!NOTE]\\\n\u003e When we use `code runner` extension for running our code.\\\n\u003e It uses output window for printing results.\\\n\u003e Where we cannot interact I mean cannot input any value.\n\u003e\n\u003e **Here is a solution for it.**\\\n\u003e Run your code using `code runner`\\\n\u003e Open terminal window in vs code and type the name of the file which is generated by code runner.\\\n\u003e `firstprogram.exe`\n\u003e\n\u003e **Congrats! 🎉**\\\n\u003e You have learnt the basic Installation process and code running process.\n\n#### Happy Coding! 💖","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninja-vikash%2Flearn-cpp-as-newbie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninja-vikash%2Flearn-cpp-as-newbie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninja-vikash%2Flearn-cpp-as-newbie/lists"}