How can i get an ofstream to output a string?

For a college project i am working on right now, we have to create a program that will take in characters from a text file and output it into an html file. So that is fairly easy to figure out but the problem is that if there are 2 new lines/breakpoints in the text we need to put </br > tags in so that the program will create new paragraphs in the HTML file. but when i try to do the following: ofs.put('</br >); or ofs.put(breaker); (with a string variable called breaker that contins the '</br >) visual studio always gives me a syntax error saying that it can only output char values

So how could i output the '</br >' values?

Thanks in advance for your help
ofs << breaker; or ofs.write(breaker);//breaker should be char* type
Last edited on
Topic archived. No new replies allowed.