how to put ascii art to c++
i write code
cout << R"(
_____ __ _____ _ _ ___ _ _ __ ___ _ __ __ _ ________
|_ /__\ | | || | | | | | |/| _ \ | | \ | | |/ / |
| || / | | | | >< | | | 'V' | / | v / || v | | | ' | _ | |
|| _/ || ||||| !/ _!_/||_|__/ ||_|_/ ||
) " << '\n';
but it error there are missing terminating character
Hi,
you could do something like this:
#include <iostream> using namespace std; int main() { cout << " _____ __ _____ _ _ ___ _ _ __ ___ _ __ __ _ ________ " << endl; cout << " |_ _/__\ |_ _| || | __| | | | |/__\| _ \ | | _\ | \| |/ _/_ _| " << endl; cout << " | || \/ | | | | >< | _| | V | \/ | v / |_| v | | | | \__ | | " << endl; cout << "|_| \__/ |_| |_||_|___| !_/ \_!\__/|_|_\___|__/ |_|\__|\__/ |_| " << endl; }
Basically you're outputting each line, line by line.
Or on one line:
#include <iostream> using namespace std; int main() { cout << " _____ __ _____ _ _ ___ _ _ __ ___ _ __ __ _ ________ \n |_ _/__\ |_ _| || | __| | | | |/__\| _ \ | | _\ | \| |/ _/_ _| \n | || \/ | | | | >< | _| | V | \/ | v / |_| v | | | | \__ | | \n|_| \__/ |_| |_||_|___| !_/ \_!\__/|_|_\___|__/ |_|\__|\__/ |_| " << endl; }
We separate each line with \n
.
However, you'll probably get warnings because there are a bunch of starting escape codes (\
), so you might want to take them off, or replace them.
Good luck! ;)
thank for [email protected]
it's because you have to use separate court << lines for it. Not just one. it has to be like cout <<
cout <<
cout << ... and so forth
its cout <<
, not cout >>
. It would be cin >>
cool np! :)
@RYANTADIPARTHInoo you don't reee that's a raw string no downgrading >:(
@RYANTADIPARTHI
that's strange. Did you maybe insert an extra
?
thank! but i try to do this is error that show are missing terminating character
@Coder100hmm it is working for me
@PhuPnsi can't run the [email protected]
why not?
@PhuPnssend repl
@PhuPnshttps://repl.it/@PhuPns/PerfumedBlindTraining#[email protected]