fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void func1(int val) {
  5. cout << val << endl;
  6. }
  7.  
  8. void func(void* arg) {
  9. int* val = static_cast<int*>(arg);
  10. func1(*val);
  11. }
  12.  
  13. int main() {
  14. // your code goes here
  15. int i = 10;
  16. func((void*)&i);
  17. return 0;
  18. }
Success #stdin #stdout 0s 5516KB
stdin
Standard input is empty
stdout
10