fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. double funktion(double);
  5. double funcshn(double);
  6.  
  7. int main(){
  8. int i = 0;
  9. double x = 0;
  10. for (i = 0; i < 10; i++){
  11. x = x + funktion(x);
  12. }
  13. cout << x;
  14. }
  15.  
  16. double funktion(double x){
  17. double y = 10;
  18. return x + funcshn(&y);
  19. }
  20.  
  21. double funcshn(double *y){
  22. return (*y)+10;
  23. }
  24.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'double funktion(double)':
prog.cpp:18:26: error: cannot convert 'double*' to 'double' for argument '1' to 'double funcshn(double)'
     return x + funcshn(&y);
                          ^
stdout
Standard output is empty