I am programming with C++11 and was wondering if there is a way to generate some code during execution. 

For example instead of writing:

```
void b(int i){i+1}
void c(int i){i-1}
if(true) b()
else{ c() }

```

would there be a more straightforward way to say if true, then replace all + with - ?

Thank you and sorry if this question is stupid..