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.
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;
}
But it doent work?
Please help me.