Hey, so I have this project I have to do where I have to convert a txt file into an html file, and when there is a line return I need to insert a <br/> tag. I have never done anything like this and I have looked all over for string to char specific for my problem but none of the methods i have found work, here is my function for inserting the tag... I am relatively new to c++ so clarity would be much appreciated!
std::ifstream text_file( "text file name" ) ;
std::ofstream html_file( "html file name" ) ;
std::string line ;
while( std::getline( text_file, line ) ) // for each line in the text file
html_file << line << "<br/>" ; // write it out with the newline replaced by "<br/>"