#include <iostream>
#include <conio.h>
//function prototypes here
void sum (int, int);
int main()
{
clrscr();
sum(10, 15);
std::cout << "ok";
return 0; // don't have to implicitly call this, but I started back in 1997 when void main was allowed still
}
void sum(int x, int y)
{
int s;
s = x + y;
std::cout << "sum = " << s << std::endl;
}
Now if you don't know the standard identifiers, as I don't know them all, you can cheat and add usingnamespace std; right under #include <conio.h> .