C++ (Qt)class Foo{public: static int test(int *x) { x = new int; *x = 10; return *x; }}; int main() { int x = 28; qDebug() << Foo::test(&x); qDebug() << x; return 0;}
1028