Use getline() to store the line in a string. Then you can use the memberfunction find() (http://www.cplusplus.com/reference/string/string/find.html) to see or there is a dot in the line. If not (find() will return npos), you can print the string on the screen/write it to a file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream>
usingnamespace std;
int main()
{
string a="123.567";
string b="1234567";
if (a.find(".")==a.npos)
cout<<a<<endl;
if (b.find(".")==b.npos)
cout<<b<<endl;
cin.ignore();
return 0;
}