Pourquoi ce prob me dit une error d'embiguiter :
#include <iostream>
#include <conio>
//----FUNCTION DECLARATION SECTION (PROTOTYPES)--
double abs (double Num1);
int abs (int Num2);
int main()
{
int Num1 = 5, Num2 = -6, integer = 0;
double Real1 = 45.6, Real2 = -77.1, num1 = 0.0;
{
// Use std as shown below
// We discussed this today
std::cout << "Please give an integer: ";
std::cin >> integer;
std::cout << "Please enter a fractional number: ";
std::cin >> num1;
std::cout<< abs(integer)<<std::endl;
std::cout<< abs(num1)<<'\n';
std::cout << abs(Real2)<<std::endl;
std::cout << abs(Real1)<<std::endl;
std::cout << abs(Num1)<<std::endl;
std::cout << abs(Num2)<<std::endl;
}
getch();
return 0;
}
//----FUNCTION IMPLEMENTATION SECTION----
double abs (double Num1)
{
if ( Num1 < 0.0 )
{
return -Num1;
}
return Num1;
}
int abs (int Num2)
{
if ( Num2 < 0 )
{
return -Num2;
}
return Num2;
}