#include class Integertest {public: int value;}; void test(Integertest &a) { a = Integertest(); a.value = 5; } int main() { Integertest b; b.value = 50; std::cout << b.value; test(b); std::cout << b.value; }