vault backup: 2024-10-25 14:01:54
This commit is contained in:
parent
87121bd4a2
commit
f5c0b5f1bf
@ -9,4 +9,7 @@
|
||||
```c
|
||||
middle = (low + high) / 2
|
||||
```
|
||||
The above statement is illegal because you can't add two pointers together
|
||||
The above statement is illegal because you can't add an `int *` to an `int *`. It can be made legal by casting `low` and `high` to numbers, performing the operation, then casting to a pointer.
|
||||
```c
|
||||
middle = (int*) (((long) low + (long) high) / 2);
|
||||
```
|
Loading…
Reference in New Issue
Block a user