Im trying to learn c++ in my spare time and needed a little guidance. Im trying to ask a user to input a file which contains a list of email addresses. From that list i want to check each email address to say that that each address contains exactly 1 period. And i want to solve this using a bool that includes a pointer. Im having trouble on how to start the function. I was successful inputting the file but im lost on my next move. Any help is appreciated. thanks.
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <cstring>
using namespace std;
bool oneAt(const char *email);
bool nonblankAt(const char *email);
bool oneDot(const char *email);
bool nonblankDot(const char *email);
int main(){
char filename[25];
ifstream fin;
cout << "Enter the input file\n";
cin >> filename;
fin.open(filename);
if(fin.fail()){
cerr << "Input file opening error.\n";
}
else{
cout << "success\n";
}
const int size = 50;
char line[size];
fin.close();
system("Pause");
return 0;
}
bool oneAt(const char *email)