Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- int a = 0;
- string line;
- setlocale(LC_ALL, "rus");
- ifstream fout("C:\\testing\\test.txt");
- if (fout)
- {
- while (true)
- if (!isdigit(char(fout.peek())))
- fout.ignore();
- else {
- fout >> a;
- cout << a << ' ';
- }
- }
- else
- cout << "Нет на диске";
- fout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement