This assignment is using characters and strings in C++

I think its mentioned but this C++ assignment is regarding characters and strings, if that makes sense.

You will also write additional code to validate each input as well as compare that two emails entered are the same.

// This code segment is to read the email address from the user and
// then validate if this is a valid email address
// … that is only alphabets and numbers; no special characters, except @ _ - .

char email1[80], email2[80];

cout << “Please enter email address: ” ;
cin >> email1;

// a) validate email address #1 to make sure that it contains legal characters
// if not, print-out “Illegal email address, please re-enter”

cout << “Please re-confirm email address: ”;
cin >> email2;

// b) validate email address #2 to make sure that it contains legal characters
// if not, print-out “Illegal email address, please re-enter”


// c) compare two emails, if they are the same then print-out “EMAIL CONFIRMED”
// otherwise, print-out “EMAIL NOT CONFIRMED”
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.