prog.cpp:16:7: error: ambiguating new declaration of ‘float add(int, int)’
float add(int a, int b){
^~~
prog.cpp:4:5: note: old declaration ‘int add(int, int)’
int add(int a, int b){
^~~
prog.cpp: In function ‘int main()’:
prog.cpp:22:2: error: ‘v’ was not declared in this scope
v=add(1,6);
^
prog.cpp:23:2: error: ‘z’ was not declared in this scope
z=add(1.3,7);
^
prog.cpp:24:2: error: ‘c’ was not declared in this scope
c=add(1.1,4.5);
^
prog.cpp:24:15: error: call of overloaded ‘add(double, double)’ is ambiguous
c=add(1.1,4.5);
^
prog.cpp:4:5: note: candidate: ‘int add(int, int)’
int add(int a, int b){
^~~
prog.cpp:8:7: note: candidate: ‘float add(float, float)’
float add(float a, float b){
^~~
prog.cpp:12:5: note: candidate: ‘int add(int, float)’
int add(int a, float b){
^~~