Question
C++ Write a function that receives an email in any of the formats in the original data and returns an email in the specified format.
C++
Write a function that receives an email in any of the formats in the original data and returns an email in the specified format. The email is to be complete including username, @, and domain.
In the original data,some of the emails have been abbreviated. If the email only has the username (no @ or domain), it is a student email account. In this case, add @student.mail to the username.
bilbo.baggins becomes: bilbo.baggins@student.mail
If the email has the username, an @, and the first part of the domain, add .com at the end.
bilbo.baggins@student.mail becomes: bilbo.baggins@student.mail
Add the function prototype in the directories.h file.
std::string FixEmail(std::string email);
Write the function definition in the directories.cpp file.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started