Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main(){
- const char * nazwaPliku = "1.html";
- ifstream strona(nazwaPliku);
- if (strona.is_open()){
- string foo;
- string szukana = "class=\"wpis\"";
- int wystapien = 0;
- while (strona >> foo){
- if(foo.find(szukana) != string::npos){
- wystapien++;
- }
- }
- if(wystapien==1){
- remove(nazwaPliku);
- }
- }
- strona.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment