---
# System prepended metadata

title: 三元運算子
tags: [C++Book]

---

三元運算子
===
###### tags: `C++Book`
```cpp=
loli = x ? y : z;
```

就是下面那個東西

```cpp=
if (x)
    loli = y;
else
    loli = z;
```
>https://hackmd.io/tT8oTtD1QpiRUVn5iw-wvA?both