Question

So I need to print a title using \ __ ||

it will become something like this

  ______
 |_   _ \
   | |_) |
   |  __'.
  _| |__) |
 |_______/

how to print all, and i get error even though i use \ to print \

Was it helpful?

Solution 2

I'm able to print out your image with this code:

char* thing = "  ______\r\n |_   _ \\\r\n   | |_) |\r\n   |  __'.\r\n  _| |__) |\r\n |_______/";

int main( void )
{
    printf("%s",thing);
    return 0;
}

What you need is a string escaping tool, if you plan on escaping complex images. I used one at http://www.freeformatter.com/java-dotnet-escape.html#ad-output

OTHER TIPS

To print \ you need to put \\ in your string, because \ is an escape (e.g. \n for a new line).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top