All pastes #15211 Raw Edit

Miscellany

public text v1 · immutable
#15211 ·published 2005-06-21 02:52 UTC
rendered paste body
#include <cstdlib>
#include <iostream>
#include <fstream.h>
#include <stdlib.h>
#include <string.h>

using namespace std;

int main(int argc, char *argv[])
{
 //   system("C:\\wget\\wget.exe -U msie http://groups-beta.google.com/group/alt.magick -O alt.magick");
  char buffer[256];
  ifstream examplefile ("alt.magick");
  if (! examplefile.is_open())
  { cout << "Error opening file"; exit (1); }
 int count=0;
  while (count < 800 )
  {
  count++;
    examplefile.getline (buffer,100);
    
    if( strstr(buffer,"<a href=")!= NULL ){                       
   
    cout<<buffer<<endl<<count<<endl;
         cin>>buffer;

  }
  return 0;
}