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:
- Go to bpa.st or mystb.in
- Paste your code
- Click the paste button in the bottom-left corner
- Copy the new URL of the site
- 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;