Treat main as a function:
- You have no parameters in the () after main.
- You have to return an integer at the end of the function, though most compilers will automatically return a value for main so you dont need to.
Essentially, just write the function like this:
using namespace std;
int setprecision(int pi);
pi = ( asin(1)*2 );
cout << " The value of pi is: " << pi << setprecision(pi) << endl;
Of course, you'll need to change the code according to want you want. For more information, check out: http://learn.onlinegdb.com/c%2B%2B_functions