Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
In C++ I'm writing a log reader for the game neverwinter nights. It takes the txt log and converts it into html.
the log is just a txt with the following format:
name: [talk] chat text
where [talk] is, it could be [shout], [tell], it's just the type of chat it is.
Now, I'd like to add a to the beginning of each line, which I can do. What I can't do is add a after the first ":" in each line, and then tags before and after each [chat] part.
Can someone help me out with this?
Here's the loop that prints the meat of the log to the html file:
while(txt.eof() == 0)
{
txt.getline(temp, max);
html " \n";
}

temp is the outputtxt;
temp is the chat txt
inserttxt is the text you want to insert
you have to change the sizes as you needint i;
char temp[255],temp2[255],inserttxt[255];for (i=0;i4;i++) temp[i]=temp2[i];
temp[i]=0x00;
strcat (temp,inserttxt);
strcat (temp,temp2+i);

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |