View Single Post
  #6 (permalink)  
Old 05-11-2008, 10:13 AM
chest069 chest069 is offline
Newbie
 
Join Date: May 2008
Posts: 1
Credits: 0
Rep Power: 0
chest069 is on a distinguished road
Default Re: convert character to Ascii in C++???

Hey Guys,

I am new to learning C++ and I am trying to make a C++ program to display an Ascii image. Can someone help me get started on how to make this work? Thanks. I have included the image I am trying to make and the code that I have created. Can you tell me what I am doing wrong and how to get started correctly if I am doing this wrong? It is supposed to be the Ubuntu image but in ascii.

Image

.-.
.-'``(|||)
,`\ \ `-`. 88 88
/ \ '``-. ` 88 88
.-. , `___: 88 88 88,888, 88 88 ,88888, 88888 88 88
(:: : ___ 88 88 88 88 88 88 88 88 88 88 88
`-` ` , : 88 88 88 88 88 88 88 88 88 88 88
\ / ,..-` , 88 88 88 88 88 88 88 88 88 88 88
`./ / .-.` '88888' '88888' '88888' 88 88 '8888 '88888'
LGB `-..-( )
`-`

Code

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
cout << " .-. ";
cout << " .-'``(|||) ";
cout << " ,`\ \ `-`. 88 88 ";
cout << " / \ '``-. ` 88 88 ";
cout << " .-. , `___: 88 88 88,888, 88 88 ,88888, 88888 88 88 ";
cout << " (:: : ___ 88 88 88 88 88 88 88 88 88 88 88 ";
cout << " `-` ` , : 88 88 88 88 88 88 88 88 88 88 88 ";
cout << " \ / ,..-` , 88 88 88 88 88 88 88 88 88 88 88 ";
cout << " `./ / .-.` '88888' '88888' '88888' 88 88 '8888 '88888' ";
cout << " LGB `-..-( ) ";
cout << " `-` ";

system("PAUSE");
return EXIT_SUCCESS;
}
Reply With Quote