Terminal
Write Line Examples*
Hello World string
The following code shows examples of using Write Line to print a string in the terminal.
#include "splashkit.h"
int main(){ // Example 1: Print explicit string write_line("Hello World");
// Example 2: Print value of string variable string message = "Hello World from 'message' variable"; write_line(message);
// Example 3: Print combination of explicit string and value of string variable string hello = "Hello"; write_line(hello + " World!\nDon't forget spaces between words when printing to the terminal!"); write_line("Otherwise you get this: " + hello + "World!");
return 0;}
using static SplashKitSDK.SplashKit;
// Example 1: Print explicit stringWriteLine("Hello World");
// Example 2: Print value of string variablestring message = "Hello World from 'message' variable";WriteLine(message);
// Example 3: Print combination of explicit string and value of string variablestring hello = "Hello";WriteLine(hello + " World!\nDon't forget spaces between words when printing to the terminal!");WriteLine("Otherwise you get this: " + hello + "World!");
Output:
ASCII Art - Charlie the Unicorn
The following code is an example of using Write Line to create ASCII art of “Charlie the Unicorn” in the terminal.
#include "splashkit.h"
int main(){ write_line(""); write_line("CHARRRLLIIEEEE! WE'RE GOING TO CANDY MOUNTAIN CHARLIE!"); write_line(""); write_line(""); write_line(" ###@ "); write_line(" %% #*=# "); write_line(" @#*# ##*-*% "); write_line(" #+*% %**%+--#% "); write_line(" %#=-#% %%###*++::+@ "); write_line(" %#*%#=:+%@ @%#*+==+++-:-*% "); write_line(" @%%#*+*-:-#% @%#+=========-::*% "); write_line(" @%#*++=+**=::=%@@%*================*@ "); write_line(" %%#++++=====-::-%%#*+====-===++===+==+-*@ "); write_line(" @%#+==+==========-=-#*+=======-+*++====----+% "); write_line(" @#*+=========+====+--++#*==-==--=+*+++====----+% %%@ "); write_line(" @@#++==+=======++++====+---%*=-=--===#%#*++===----:* @#%@ "); write_line(" @%*+=============*++++====----**=-----*@ @@@@%#**=---+# @=%% "); write_line(" @%++===============***++=====----*#=-==+% @@%#+*+=*@ @++% "); write_line(" #%%##**++====++*#%%#+++======--===-===*%%%#*++==-----+%+==#@ @%#+*@ #-*% "); write_line("====------:::::=#*+========---===--===+%#*#%@@%#**+-===*#+*@ @@ @--%% "); write_line("+====----:::=#%*--==========----=-====%#*+===+#@@#**=-=###@ %*:-%% "); write_line("+===----=*%%+=--------=-------=======#%*+=-----=+%%#**%%#%@ #::+%%%%% "); write_line("#***#%@%*====-----------------======*%#*+=----::--+####*#@ #=:-*@@+*@ "); write_line("-:---:----====-::--::::::----=-====+%#*+=-------:::-=++*%@ @+::=*%*+%% "); write_line("-::::--------==-------::::::----===#%*+==----==-------=#@ @%=::--=**#%% "); write_line("-:::::--:-----==------::::::::--==+@*+==-----==-------=%@ @#-:-=*+--=***%@ "); write_line("-::::::::::---==--=-----::::::---=##*+====------------+@ @%#=:=##==++++++++#%%% "); write_line("-::::::::::-::-==----==---:::----*%**+=====---------==#@ @#=::---==:-*+++++++*++*%%%%%%@%% "); write_line("-:---:---::::--==----====-------=%#*+==+++=====---===+% @%+---------=++++++++++++------=====+*#%%%%%@@@@ "); write_line("------------------=---===-------+%#*++++***+========+%@ @#+---==--======+++++++++++=-------=------=====++++**##%%%@ "); write_line("---------------=====-----=---===*@%#*****#***++===+%@ @=:++++====-====+++++++**+++++===---=------=---------------=+%%%@ "); write_line("===------------=====---------===%@@%%%%%%%#*+==--+% #:-+======++++=+++***++*+++++=+===+=========-==--------:-------=*#%%# "); write_line("+===============+++======-=====*@@@@@@@@ @%*+===-*@ *--+*+==++**###********+++++==+====+++=========--------::::-------=+%@% @%%@%%####%%%%%###* "); write_line("+++++===========+***+=========*%@ %*+====#@ @@@@@%#%%@@@@@@@@@@@@%#**+++*++======+===========-::::::::---::-----==*%%%%## #%%@@%%#*=-::::::::::----=+*#"); write_line("*******++++++++++*#**++++===*%@ %#*===+@ @@%%%%######*#*#*#%%@@@#*+++++++==============--::::::::----::---==-----=+*******+==-::::::::::::::::---------"); write_line("###############**###*++==-=#@ %#*==+%% %@%#*++++=++============-::::::::-------=----------::::::::::::::::::::::::::----------="); write_line("@@@@@%%%%%%%%@@@@@@#*++==-=%@ %#*==+@ @@@%#*++=++==========:::::::::::-------------:::::::::::::::::::::::::::::-----------="); write_line("#***##*#@% @%*+++==*@ %#+=-+@ %%@%#+++*+=======-::::::::--------==-----::::::::::::::::::::::::::---------------="); write_line("%**==++=#@ @%**++==#@ %#+--*@ %@%**++++++++-::::::::---------=--::---:::::::::::::::::::::::::::::-----------="); write_line(" %*=-=*--%@ %#*=++*@ %%*==% @@%#*+++*+=--::::-------------------::::::::::::::::::----:::::::------------="); write_line(" #*--#+:=%@ @#*=++%@ @#*=+% @@%***+=--::::------------=------:---------------------::::::-------------=="); write_line(" @#+-=*=:=%@ @#*==+@% %#+-+% @#==--===------------------------------------------------:::---------========"); write_line(" %*=:=+=:+@ @*+--+@ %#+-=# @--=-=-------------------------------------------------=-::---------=========+"); write_line(" #+-:=++%% @*+--*% %*=-+% @+----==+=----::-----------==----------------------======-:--------=========+++"); write_line(" %#=----#%# @#*==#@ %*+-=# @#--++======-:::::--------------------==----============+=-------=====++++++++++"); write_line(" %*===+*%# @#*=+% @#+-+#%% #=-*##%+==-----:::--------==--====================+++++++==-------=+++++++++++++"); write_line(" @*=-=%@#### @#+=*@ %#=:+%%% @@=-**#@@%+=------:-------=======================++++++++*#*++=-------=+**********"); write_line(" **++*#@### @*+-+% @%%%%%%% @+:-+*#@@@#%+=-----:----=====++===+++++++=====++++++**********+**=------=+*******##"); write_line(" %%%##%%## %*=-+% %@@@@@@ @+:-+**==-+#%@*=--------==+*****+++++****++++*****************###**+==----==*#####% "); write_line(" %#%%%## @%*=-+@ @#:=****--:+%%%@#==-----=++*********###################**####%@@@@%**#+=----===+# "); write_line(" %*+--*% @#:-=+#%@%#*#%%%%%%+===+++*****#%%%%%%%%%%%%%%#######%%%%%%#==+%@+--=+****+---===+* "); write_line(" @#=-*%%%% %++***%@%#%@@@@@@%%%%#*+++****#%@@@%%%%%%%@@@@@%%%@@@@@@@%%*---=+#@%##***++=--=====* "); write_line(" %*=:*@@@ @#%%%%%%%@ @@%#####%@% %%%%%%% %%@*--------------==++=====%@ "); write_line(" @@%%%%%%@ %%%%%#%%%@ @@@@@@ *=---=========---=====+*%@ "); write_line(" %@@@@@@ @%%#%%@@% *=========+*#%%@@@@@@@@%% "); write_line(" @%%%%@%# ++*%@@@@@%%% ");
return 0;}
using static SplashKitSDK.SplashKit;
WriteLine("");WriteLine("CHARRRLLIIEEEE! WE'RE GOING TO CANDY MOUNTAIN CHARLIE!");WriteLine("");WriteLine("");WriteLine(" ###@ ");WriteLine(" %% #*=# ");WriteLine(" @#*# ##*-*% ");WriteLine(" #+*% %**%+--#% ");WriteLine(" %#=-#% %%###*++::+@ ");WriteLine(" %#*%#=:+%@ @%#*+==+++-:-*% ");WriteLine(" @%%#*+*-:-#% @%#+=========-::*% ");WriteLine(" @%#*++=+**=::=%@@%*================*@ ");WriteLine(" %%#++++=====-::-%%#*+====-===++===+==+-*@ ");WriteLine(" @%#+==+==========-=-#*+=======-+*++====----+% ");WriteLine(" @#*+=========+====+--++#*==-==--=+*+++====----+% %%@ ");WriteLine(" @@#++==+=======++++====+---%*=-=--===#%#*++===----:* @#%@ ");WriteLine(" @%*+=============*++++====----**=-----*@ @@@@%#**=---+# @=%% ");WriteLine(" @%++===============***++=====----*#=-==+% @@%#+*+=*@ @++% ");WriteLine(" #%%##**++====++*#%%#+++======--===-===*%%%#*++==-----+%+==#@ @%#+*@ #-*% ");WriteLine("====------:::::=#*+========---===--===+%#*#%@@%#**+-===*#+*@ @@ @--%% ");WriteLine("+====----:::=#%*--==========----=-====%#*+===+#@@#**=-=###@ %*:-%% ");WriteLine("+===----=*%%+=--------=-------=======#%*+=-----=+%%#**%%#%@ #::+%%%%% ");WriteLine("#***#%@%*====-----------------======*%#*+=----::--+####*#@ #=:-*@@+*@ ");WriteLine("-:---:----====-::--::::::----=-====+%#*+=-------:::-=++*%@ @+::=*%*+%% ");WriteLine("-::::--------==-------::::::----===#%*+==----==-------=#@ @%=::--=**#%% ");WriteLine("-:::::--:-----==------::::::::--==+@*+==-----==-------=%@ @#-:-=*+--=***%@ ");WriteLine("-::::::::::---==--=-----::::::---=##*+====------------+@ @%#=:=##==++++++++#%%% ");WriteLine("-::::::::::-::-==----==---:::----*%**+=====---------==#@ @#=::---==:-*+++++++*++*%%%%%%@%% ");WriteLine("-:---:---::::--==----====-------=%#*+==+++=====---===+% @%+---------=++++++++++++------=====+*#%%%%%@@@@ ");WriteLine("------------------=---===-------+%#*++++***+========+%@ @#+---==--======+++++++++++=-------=------=====++++**##%%%@ ");WriteLine("---------------=====-----=---===*@%#*****#***++===+%@ @=:++++====-====+++++++**+++++===---=------=---------------=+%%%@ ");WriteLine("===------------=====---------===%@@%%%%%%%#*+==--+% #:-+======++++=+++***++*+++++=+===+=========-==--------:-------=*#%%# ");WriteLine("+===============+++======-=====*@@@@@@@@ @%*+===-*@ *--+*+==++**###********+++++==+====+++=========--------::::-------=+%@% @%%@%%####%%%%%###* ");WriteLine("+++++===========+***+=========*%@ %*+====#@ @@@@@%#%%@@@@@@@@@@@@%#**+++*++======+===========-::::::::---::-----==*%%%%## #%%@@%%#*=-::::::::::----=+*#");WriteLine("*******++++++++++*#**++++===*%@ %#*===+@ @@%%%%######*#*#*#%%@@@#*+++++++==============--::::::::----::---==-----=+*******+==-::::::::::::::::---------");WriteLine("###############**###*++==-=#@ %#*==+%% %@%#*++++=++============-::::::::-------=----------::::::::::::::::::::::::::----------=");WriteLine("@@@@@%%%%%%%%@@@@@@#*++==-=%@ %#*==+@ @@@%#*++=++==========:::::::::::-------------:::::::::::::::::::::::::::::-----------=");WriteLine("#***##*#@% @%*+++==*@ %#+=-+@ %%@%#+++*+=======-::::::::--------==-----::::::::::::::::::::::::::---------------=");WriteLine("%**==++=#@ @%**++==#@ %#+--*@ %@%**++++++++-::::::::---------=--::---:::::::::::::::::::::::::::::-----------=");WriteLine(" %*=-=*--%@ %#*=++*@ %%*==% @@%#*+++*+=--::::-------------------::::::::::::::::::----:::::::------------=");WriteLine(" #*--#+:=%@ @#*=++%@ @#*=+% @@%***+=--::::------------=------:---------------------::::::-------------==");WriteLine(" @#+-=*=:=%@ @#*==+@% %#+-+% @#==--===------------------------------------------------:::---------========");WriteLine(" %*=:=+=:+@ @*+--+@ %#+-=# @--=-=-------------------------------------------------=-::---------=========+");WriteLine(" #+-:=++%% @*+--*% %*=-+% @+----==+=----::-----------==----------------------======-:--------=========+++");WriteLine(" %#=----#%# @#*==#@ %*+-=# @#--++======-:::::--------------------==----============+=-------=====++++++++++");WriteLine(" %*===+*%# @#*=+% @#+-+#%% #=-*##%+==-----:::--------==--====================+++++++==-------=+++++++++++++");WriteLine(" @*=-=%@#### @#+=*@ %#=:+%%% @@=-**#@@%+=------:-------=======================++++++++*#*++=-------=+**********");WriteLine(" **++*#@### @*+-+% @%%%%%%% @+:-+*#@@@#%+=-----:----=====++===+++++++=====++++++**********+**=------=+*******##");WriteLine(" %%%##%%## %*=-+% %@@@@@@ @+:-+**==-+#%@*=--------==+*****+++++****++++*****************###**+==----==*#####% ");WriteLine(" %#%%%## @%*=-+@ @#:=****--:+%%%@#==-----=++*********###################**####%@@@@%**#+=----===+# ");WriteLine(" %*+--*% @#:-=+#%@%#*#%%%%%%+===+++*****#%%%%%%%%%%%%%%#######%%%%%%#==+%@+--=+****+---===+* ");WriteLine(" @#=-*%%%% %++***%@%#%@@@@@@%%%%#*+++****#%@@@%%%%%%%@@@@@%%%@@@@@@@%%*---=+#@%##***++=--=====* ");WriteLine(" %*=:*@@@ @#%%%%%%%@ @@%#####%@% %%%%%%% %%@*--------------==++=====%@ ");WriteLine(" @@%%%%%%@ %%%%%#%%%@ @@@@@@ *=---=========---=====+*%@ ");WriteLine(" %@@@@@@ @%%#%%@@% *=========+*#%%@@@@@@@@%% ");WriteLine(" @%%%%@%# ++*%@@@@@%%% ");
Output: