I am writing a program that uses the hexadecimal dump dumps of its input. However, I ran into problems wrapping lines, tabs, etc. And destruction of output formatting.
How can I use printf (or cout, I think) to print '\ n' instead of printing the actual new line? Do I just need to disassemble manually for this?
EDIT: I get my data dynamically, it's not only \ n that I fixed, but all the characters. For example, this is my printf statement:
printf("%c", theChar);
How can I print this \ n when a newline is passed as Char, but still makes it print plain text when Char is a valid printable character?
samoz source
share