1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Need to print some ascii art ina window with dev, how to?

Discussion in 'Programming & Webmastering' started by [I.R.A]_FBi, Mar 6, 2009.

  1. [I.R.A]_FBi

    [I.R.A]_FBi New Member

    Joined:
    May 19, 2007
    Messages:
    7,664 (2.79/day)
    Thanks Received:
    540
    Location:
    c:\programs\kitteh.exe
    Code:
     _______           _______  _______  _______ 
    (  ____ )|\     /|(  ____ )(  ____ \(  ____ \
    | (    )|| )   ( || (    )|| (    \/| (    \/
    | (____)|| |   | || (____)|| (_____ | (__    
    |  _____)| |   | ||     __)(_____  )|  __)   
    | (      | |   | || (\ (         ) || (      
    | )      | (___) || ) \ \__/\____) || (____/\
    |/       (_______)|/   \__/\_______)(_______/
                                                 
     _______  _______  _______  _______  _______  _______  _______ 
    (  ____ )(  ____ )(  ___  )(  ____ \(  ____ )(  ___  )(       )
    | (    )|| (    )|| (   ) || (    \/| (    )|| (   ) || () () |
    | (____)|| (____)|| |   | || |      | (____)|| (___) || || || |
    |  _____)|     __)| |   | || | ____ |     __)|  ___  || |(_)| |
    | (      | (\ (   | |   | || | \_  )| (\ (   | (   ) || |   | |
    | )      | ) \ \__| (___) || (___) || ) \ \__| )   ( || )   ( |
    |/       |/   \__/(_______)(_______)|/   \__/|/     \||/     \|
    
    want to print that but apparently underscore is somethign reserved so i cant use cout ... what to do?
     
  2. DanTheBanjoman SeƱor Moderator

    Joined:
    May 20, 2004
    Messages:
    10,553 (2.75/day)
    Thanks Received:
    1,383
    Underscore shouldn't be anything, it's the backslashes. Escape them, ie \\ instead of \.
     
    [I.R.A]_FBi says thanks.
  3. [I.R.A]_FBi

    [I.R.A]_FBi New Member

    Joined:
    May 19, 2007
    Messages:
    7,664 (2.79/day)
    Thanks Received:
    540
    Location:
    c:\programs\kitteh.exe
    i wish i could give you a kiss dan!
     
  4. morpha

    morpha

    Joined:
    Jan 15, 2009
    Messages:
    416 (0.19/day)
    Thanks Received:
    55
    Location:
    Australia
    be carefull of reserved characters... every programming language has them. (as far as i know) all programming languages use backslashes to escape them.
     
  5. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,964 (6.25/day)
    Thanks Received:
    3,803
    Location:
    IA, USA
    C# supports adding a @ symble before the string to ignore escaped characters. For example, these two statements have the exact same result:
    Code:
    Console.WriteLine("C:\\WINDOWS\\system32\\notepad.exe");
    Console.WriteLine(@"C:\WINDOWS\system32\notepad.exe");
    Both point to notepad at C:\WINDOWS\system32\notepad.exe

    A lot of languages have shortcuts like that.
     
    Crunching for Team TPU

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page