void test(int && val) { val=4; } void main() { test(1); std::cin.ignore(); }
Is a int is created when
int
An int with the value 1 is created when test is called. Literals are typed by their form. For example, 1 is an int, 1.0 is a double, "1" is a string.