i am taking my first C++ class and i can not clear the following error can anyone help
error C2447: '{' : missing function header (old-style formal list?)
//christine gershen
// Exercise 4.17: Encryption.cpp
// Encrypts data given by user.
#include <iostream> // required to perform C++ stream I/O
#include <iomanip> // required to perform setprecision stream manipulator
using namespace std; // for accessing C++ Standard Library members
int main(); // function main begins program execution
{
int main=0;
int digit_one; //store digit one
int digit_two; //store digit two
int digit_three; //store digit three
int digit_four; //store digit four
cout <<"Enter four-digit number:"; //asking the user to enter four-digit number
cin >> main; //four-digit number
digit_one=main%10; // digit_one is first four-digit number
digit_two=main/10%10; // digit_two is second four-digit number
digit_three=main/100%10; //digit_three is third four-digit number
digit_four=main/1000%10; //digit_four is fourth four-digit number
digit_one=(digit_one + 7%10); //add digit_one to 7 and mod 10
digit_two=(digit_two + 7%10); //add digit_two to 7 and mod 10
digit_three=(digit_three + 7%10); //add digit_three to 7 and mod 10
digit_four=(digit_four + 7%10); //add digit_four to 7 and mod 10
cout <<"Encrypted digits:"; << digit_three; digit_four; digit_one; digit_two; << endl;// display encrypted numbers
return 0; // indicate that program ended successfully
}; // end function main
/**************************************************************************
* (C) Copyright 1992-2005 by Deitel & Associates, Inc. and *
* Pearson Education, Inc. All Rights Reserved. *
* DISCLAIMER: The authors and publisher of this book have used their *
* best efforts in preparing the book. These efforts include the *
* development, research, and testing of the theories and programs *
* to determine their effectiveness. The authors and publisher make *
* no warranty of any kind, expressed or implied, with regard to these *
* programs or to the documentation contained in these books. The authors *
* and publisher shall not be liable in any event for incidental or *
* consequential damages in connection with, or arising out of, the *
* furnishing, performance, or use of these programs. *
**************************************************************************/