Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
xyp
Grundy Number
function pointer overload
input
Proyecto 1
СПКИ АП КЭП 2
replace-30-Seconds-of-C++
EqualIdentical
QuickSort
Hello
Please log in to post a comment.