Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
static_cast makes a copy
#include <iostream> void change_one_print_other( int& a, const int& b ) { a = 0; std::cout << b << "\n"; } int main(void) { int x = 5, y = 5; change_one_print_other(x, x); change_one_print_other(y, static_cast<int>(y)); }
run
|
edit
|
history
|
help
0
Breakfast Menu
Summation Of Primes
Roots of a Quadratic Equation
pow implementation
lock
Subset sum
Interest Compounding
Sample Code from Scott Meyer's Blog
multimap
¡Arriba, Papalotes, Arriba!