--- sejal patel <[EMAIL PROTECTED]> wrote:
> I am doing client soket programm in c++.
> IN program i have to connect wiht server,get spcified file,ans print
> result html code according to details;
>
> Details are:
>
> 1. if a '\n' then replace with single character
> 2. if <br> then replace with single newline
> 3. <p> with two new lines.
> 4.<a......> tag with [LINK] where "...." sequence of characters.
> 5.alll other tags <...> are ignored.
A custom HTML reader? Any reason why you cannot just dump output to a
file and use some browser?
>
>
> i am using string class for this.
>
> i can connect with server and get specified file from server and
> print that.but details part i am trying by
> str contain html code from server.
> string str1("\n");
> for(int i=0;i<str.size();i++)
> { if(found1=str.find(str1))
> {
> if (found1!=string::npos)
> str.replace (found1,str1.length()," ");
> }
> }
> cout <<str;
> }
I don't see any use of the for loop here.
Do you need something like:
str1=pattern-1-to-match;
while(found1=str.find(str1)){
/* Do whatever is needed */
}
> But it doent work?
> Please help me.
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo!
FareChase.
http://farechase.yahoo.com/