Feb 6, 2015 at 5:27am UTC
I have to make an email validation program and i am halfway done. I only have one more problem, consider the ff. example:
Enter email:
myemail.@something.com //this is the input
Invalid //this should be the output
How can i determine if there is a special character near the '@' sign? and vice versa?
Last edited on Feb 6, 2015 at 5:27am UTC
Feb 6, 2015 at 5:51am UTC
Yep, does it also include numbers 0-9?
Last edited on Feb 6, 2015 at 6:15am UTC
Feb 6, 2015 at 7:09am UTC
Thanks, i got it.
but i can't seem to get this to work:
1 2 3 4 5 6 7 8
for (i = 0; i < strlen(str); i++)
{
if (isalpha(str[i]) == '@' )
{
cout<<"Validddd" ;
}
}
Am i doing something wrong? i don't know what comes after that
Last edited on Feb 6, 2015 at 7:20am UTC