Hello to every one again I'm making a project that it generates some kind of report in html format, to do this i was using file streams, and all goes fine until i need to insert data between last data posted and the end of page, i means before the </body> and </html> tags. I was reading around some pages and it sayed that it is impossible, that's true?? or i have a better idea: to remove the end tags and append the new data with the end tags every time. but how i can to go to that position of end tags?? thanks, gracias
Why not just replace </body></html> with the report data and then append </body></html> to the content. Just do that before the final output flush.
Ok, that's the idea that i have but, how i can to pointer to two lines before the EOF, sorry but i don't know much about file streams theory, can you to tell me about any streams free tutorial? I need that it be free because i'm living in cuba. Thanks for all, "gracias por todo"
Read all data into a variable, then find the position of the content and then add more content in that string and then write back all the data. Other option is to use the string position to place the cursor where you found the content and then append to the file.
thanks for the idea, i hope that the endl at the end of each line don't be a problem while i try to store all the file data in a string variable. thanks again
how many characters can to store a string variable?, my report, each time, is about the flash memory content but in text format. i'm talking about, may be, a one or two MBytes in a txt document, but store in one string variable, it's possible to do that?? Thanks shabbir
how many characters can to store a string variable?, my report, each time, is about the flash memory content but in text format. i'm talking about, may be, a one or two MBytes in a txt document, but store in one string variable, it's possible to do that?? Thanks shabbir
Yes it should not be an issue and are you allocating the memory using pointer or you are using it as variable. If using as variable try using a pointer and try to allocate that amount of memory and see if it works.