Browse Source

edit readme

master
RinRi 3 years ago
parent
commit
902ee9d652
1 changed files with 24 additions and 6 deletions
  1. +24
    -6
      README.md

+ 24
- 6
README.md View File

@@ -9,21 +9,39 @@ chmod +x setup.sh
./setup.sh
```

First, you have to write template which will be used to create new files. Remember the number of the line with which you usually start coding. Enter it. That is it!
First, write a template which will be used to create new files. Enter the number of the starting line. That is it!

# Using
# Usage

In order to create a new .cpp file, you have to run create.sh with filename argument:
To create a new .cpp file, run create.sh with filename argument:

```shell
./create.sh 1234a
```

It will create 1234a.cpp. You can enter 1234a.cpp instead of 1234a and you will get the same result.
Then you will be automatically redirected to neovim.
It will create 1234a.cpp and open neovim. Enter either type 1234a.cpp and 1234a.

To compile and run file, you can use run.sh with filename as an argument(you can use both filename with extension and without):
To compile and run file, use run.sh with filename(or problem name) as an argument:

```shell
./run.sh 1234a.cpp
```

To compile faster, precompile needed header files in the directory.

```shell
# copy libraries
mkdir bits
cd bits
cp /usr/include/c++/10.2.0/x86_64-pc-linux-gnu/bits/stdc++.h .

# compile them and use the same c++ standard as in Makefile
g++ -std=c++14 stdc++.h
```

Don't forget to use double quotes in the template. GCC uses the local precompiled library first. If there is no local library, it uses system's one.

```c++
#include "bits/stdc++.h"
// "" instead of <>
```

Loading…
Cancel
Save