This repository contains starter code and resources for C++ programming. It is designed to help beginners get started with writing and understanding C++ programs, without spending too much time for project setup and build configurations.
- Basic C++ program structure
- Examples of common C++ programming concepts
- Instructions for compiling and running C++ programs
- Clone the repository and sync the submodules:
git clone https://github.com/DHANUSH-web/cpp-starter.git --recurse-submodules
- Navigate to the project directory:
cd cpp-starter - Build the project using the provided script:
This will:
# For only building ./build build # builds in debug by default [RECOMMENDED] ./build build --debug # builds in debug preset ./build build --release # builds in release preset ./build build --all # builds both debug and release preset # For build and run ./build run # runs in debug by default [RECOMMENDED] ./build run --debug # runs in debug preset ./build run --release # runs in release preset
- Create a build directory
- Configure CMake with the default preset
- Build the project
- Runs the executable
- Clean the project
./build clean # cleans the entire build [RECOMMENDED] ./build clean --debug # cleans only debug build ./build clean --release # cleans only release build
Note: You can also use ./build help to learn about the ./build command usage
Contributions are welcome! Feel free to submit issues or pull requests to improve this repository.
This project is licensed under the MIT License. See the LICENSE file for details.