fork download
  1.  
  2. void Foo(float &myFloat)
  3. {
  4.  
  5. }
  6.  
  7. int main()
  8. {
  9. int myInt = 357;
  10. Foo(myInt);
  11. }
Compilation error #stdin compilation error #stdout 0s 2848KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10:14: error: invalid initialization of reference of type ‘float&’ from expression of type ‘int’
prog.cpp:2:6: error: in passing argument 1 of ‘void Foo(float&)’
stdout
Standard output is empty