Skip to content

Instantly share code, notes, and snippets.

@AppleBoiy
Last active September 22, 2024 09:50
Show Gist options
  • Save AppleBoiy/d876b6e31320b703f13e5f3f222fb9ae to your computer and use it in GitHub Desktop.
Save AppleBoiy/d876b6e31320b703f13e5f3f222fb9ae to your computer and use it in GitHub Desktop.
add bits/stdc++.h to Mac

Bits/stdc++.h

This is a header file that includes every standard library. It is primarily used for competitive programming.

Platform Status
macOS

Installation

  1. create a directory for bits/stdc++.h

    sudo mkdir -p /Library/Developer/CommandLineTools/usr/include/bits
  2. create a file named stdc++.h in the directory

    sudo touch /Library/Developer/CommandLineTools/usr/include/bits/stdc++.h
  3. copy the content of stdc++.h to the file

    you can download the file from here

    sudo code /Library/Developer/CommandLineTools/usr/include/bits/stdc++.h

Usage

Include the header file in your program using the following code:

#include <bits/stdc++.h>

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment