Skip to content

Commit

Permalink
Add code examples for newly added operators
Browse files Browse the repository at this point in the history
* arithmetic-assignment
* increment and decrement
  • Loading branch information
faheel committed Oct 11, 2017
1 parent 4b140a5 commit d7ad8f5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@
big_int_1 = big_int_2 - "123456789012345678901234567890";
big_int_1 = big_int_2 - big_int_3;
```
* #### Arithmetic-assignment
* #### `+=`
```C++
my_big_int += 1234567890;
my_big_int += "123456789012345678901234567890";
my_big_int += my_other_big_int;
```
* #### `-=`
```C++
my_big_int -= 1234567890;
my_big_int -= "123456789012345678901234567890";
my_big_int -= my_other_big_int;
```
* #### Increment and decrement
* #### `++`
```C++
some_big_int = ++my_big_int; // pre-increment
some_big_int = my_big_int++; // post-increment
```
* #### `--`
```C++
some_big_int = --my_big_int; // pre-decrement
some_big_int = my_big_int--; // post-decrement
```
* #### Relational
* #### `<`
```C++
Expand Down

0 comments on commit d7ad8f5

Please sign in to comment.