Sophie
July 6th, 1999, 08:44 AM
I need to read a char from a file. If char is equal to the first char of the string that add one to counter. Read next char with the second char of your search string. If char not equal reset counter to 0 and move char into ostream .if equal to the length of your searchString than found the string in the file.
call a function to find out what needs to be replaced by that special string.
#include<fstream.h>
#include<iostream.h>
CString searchstring = "<!--$$(";
int len = searchstring.Getlenght();
ifstream in("page1.htm");
assure(in,"page1.htm");
ofstream out("temp.htm");
assure(out, "temp.htm");
int counter = 0;
I'm not sure how to do this could someone give me an example...Remember this is html so I'm not sure if '\0' are present...
Thank you in advance
call a function to find out what needs to be replaced by that special string.
#include<fstream.h>
#include<iostream.h>
CString searchstring = "<!--$$(";
int len = searchstring.Getlenght();
ifstream in("page1.htm");
assure(in,"page1.htm");
ofstream out("temp.htm");
assure(out, "temp.htm");
int counter = 0;
I'm not sure how to do this could someone give me an example...Remember this is html so I'm not sure if '\0' are present...
Thank you in advance