Hi,
I'm having trouble finding the '@' sign in multiple lines of text. What I want to do is find the @ sign, and if I have found it, print the whole line, if not, skip it.
So far I have this:
string input;
getline(fin, input);
for (int i = 0; !fin.eof( ); i++) reading numbers
{
getline(file
fin >> input;
}
string s;
string s2 ("@");
size_t found;
for (int i = 0; i < s.find(s2); i++)
{
found=s.find(s2);
if (found!=string::npos)
cout << "first '@' found at: " << int(found) << endl;
}
I have no idea what I'm doing. Help me out please.
Thanks