improve readme

This commit is contained in:
Johannes Kapfhammer 2019-10-06 17:40:46 +02:00
parent d594be1ac0
commit 7f4f11fb2b
1 changed files with 31 additions and 4 deletions

View File

@ -2,9 +2,16 @@
Include soi and you're ready to go! Include soi and you're ready to go!
## dbg(...) ## Features
You can debug any expressions using the macro dbg(). - includes all headers (a `bits/stdc++.h` that works on all platforms)
- has a powerful `dbg()` macro
- disables output buffering
- checks whether all input has been read
- removes evil functions from the standard library such as new and printf.
- defines int to 64 bit
The header requires at least C++11.
## Configuration ## Configuration
@ -21,7 +28,7 @@ this check using `SOI_EOFCHECK=1`.
## Template ## Template
Using this header is as simple as: Using this header is as simple as:
``` ```c++
#include <soi> #include <soi>
signed main() { signed main() {
@ -29,4 +36,24 @@ signed main() {
} }
``` ```
It requires at least c++11 to function. ## Example
See example.cpp for a larger example.
```c++
#include <soi>
signed main() {
dbg("hi");
vector<int> pi{3,1,4,1,5,9,2,6};
dbg(pi);
int x=4;
dbg(x+3);
}
```
prints:
```
[test.cpp:3 (main)] hi
[test.cpp:5 (main)] pi = [3, 1, 4, 1, 5, 9, 2, 6] (vector<long int>)
[test.cpp:7 (main)] x+3 = 7 (long int)
```