fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Stone
  5. {
  6. Stone(double x) { cout<<"Konstruktor "<<x<<endl; }
  7. };
  8.  
  9. void fun(Stone s)
  10. {
  11. cout<<"Funkcja"<<endl;
  12. }
  13.  
  14. int main()
  15. {
  16. fun(3.3); // tu nastąpi konwersja niejawna z double na Stone
  17. return 0;
  18. }
Success #stdin #stdout 0s 2728KB
stdin
Standard input is empty
stdout
Konstruktor 3.3
Funkcja