_______________________________________________________________________________
if(d==0)
error("You are dividing by zero")
_______________________________________________________________________________
Function error is defined in header "std_lib_facilities.h" that you should include in your programs.
Here is the supporting site http://www.stroustrup.com/Programming/
To access the header select •Standard library access header in the page.