How to quickly share code

Sending entire files can be problematic sometimes. Here are other options. You can either use a code block (see below), or a website designed for quickly sharing code:

  1. Go to bpa.st or mystb.in
  2. Paste your code
  3. Click the paste button in the bottom-left corner
  4. Copy the new URL of the site
  5. Send the URL

code blocks

If you want to send code somewhere markdown is supported (such as Discord), use a code block.

```cpp
cout « “Enter a number: “;
int num;
cin » num;
cout « “\nYou entered " « num;
```

Typing the above will be rendered as:

cout << "Enter a number: ";
int num;
cin >> num;
cout << "\nYou entered " << num;