fork download
  1. void funkcja( float & x, float y, short int & z ) {}
  2.  
  3. int main()
  4. {
  5. long int d; short int a; float b, c;
  6. // 3 jest liczbą całkowitą mieszczącą się w shorcie więc też będzie prawidłowe
  7. funkcja( b, c, 3 );
  8.  
  9. return 0;
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:7:22: error: invalid initialization of non-const reference of type ‘short int&’ from an rvalue of type ‘int’
prog.cpp:1:6: error: in passing argument 3 of ‘void funkcja(float&, float, short int&)’
prog.cpp:5:14: warning: unused variable ‘d’ [-Wunused-variable]
prog.cpp:5:27: warning: unused variable ‘a’ [-Wunused-variable]
stdout
Standard output is empty