Results 1 to 11 of 11

Thread: Ascii?

  1. #1

    Thread Starter
    Addicted Member Stephen Bazemore's Avatar
    Join Date
    Aug 2000
    Location
    North Carolina
    Posts
    158
    Ok, this is something a friend of mine gave me.

    Code:
        unsigned char MousesAsciiArt[187] = {
        	201,176,177,178,219,219,219,219,219,
        	176,177,178,219,219,219,219,219,176,
        	177,178,219,219,178,219,219,205,205,
        	187, 10,186, 32, 32,176,177,178,219,
        	 32, 32,176,177,178,219,219,178,219,
        	219,176,177,178,219,219,178,219,219,
        	 32, 32,186, 10,186, 32, 32,176,177,
        	178,219, 32, 32,176,177,178,219,219,
        	219,219,219,176,177,178,219,219,219,
        	219,219, 32, 32,186, 10,186, 32, 32,
        	176,177,178,219, 32, 32,176,177,178,
        	219,219,178,219,219,176,177,178,219,
        	219,178,219,219, 32, 32,186, 10,186,
        	 32, 32,176,177,178,219, 32, 32,176,
        	177,178,219,219,219,219,219,176,177,
        	178,219,219,178,219,219, 32, 32,186,
        	 10,200,205,205,205,205,205,205,205,
        	205,205,205,205,205,205,205,205,205,
        	205,205,205,205,205,205,205,205,205,
    		205,188, 10, 10, 201, 36, 45};
    
            void main(){
            	FILE *TARGET_FILE;
            	unsigned long FILE_SIZE = 0;
            	int CurChar = 0;
            	char FILE_GUTS[TARGET_FILE_SIZE - 1];
    
    
                	while(CurChar <= 173){
                		printf("%c",MousesAsciiArt[CurChar]);
                		CurChar++;}
    In that code, how can I find out what each number represents?

    Any help is appreciated. Thanks.
    Stephen Bazemore
    Email:[email protected]

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    the simplest way is to start a console app project, add
    #include <iostream.h>

    and then cout << MousesAsciiArt;

    it'll print out whatever it is

    (it's a little 3d thing the letters TBH with a border around it)

  3. #3

    Thread Starter
    Addicted Member Stephen Bazemore's Avatar
    Join Date
    Aug 2000
    Location
    North Carolina
    Posts
    158
    Hmm.. that really doesn't help much by looking at that. Well it does kinda.. is there a chart or anything that shows what character each number equals? I've searched but havent found anything.
    Stephen Bazemore
    Email:[email protected]

  4. #4
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    As Sam Finch sad it is a figure(the letters TBH). Try this code:
    [code]
    #include <iostream.h>

    int main(int argc, char* argv[])
    {
    unsigned char Ascii[187] = {
    201,176,177,178,219,219,219,219,219,
    176,177,178,219,219,219,219,219,176,
    177,178,219,219,178,219,219,205,205,
    187, 10,186, 32, 32,176,177,178,219,
    32, 32,176,177,178,219,219,178,219,
    219,176,177,178,219,219,178,219,219,
    32, 32,186, 10,186, 32, 32,176,177,
    178,219, 32, 32,176,177,178,219,219,
    219,219,219,176,177,178,219,219,219,
    219,219, 32, 32,186, 10,186, 32, 32,
    176,177,178,219, 32, 32,176,177,178,
    219,219,178,219,219,176,177,178,219,
    219,178,219,219, 32, 32,186, 10,186,
    32, 32,176,177,178,219, 32, 32,176,
    177,178,219,219,219,219,219,176,177,
    178,219,219,178,219,219, 32, 32,186,
    10,200,205,205,205,205,205,205,205,
    205,205,205,205,205,205,205,205,205,
    205,205,205,205,205,205,205,205,205,
    205,188, 10, 10, 201, 36, 45};
    for(int c=0;i<188;i++)

    cout<<Ascii[c];
    return 0;
    }
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  5. #5

    Thread Starter
    Addicted Member Stephen Bazemore's Avatar
    Join Date
    Aug 2000
    Location
    North Carolina
    Posts
    158
    I'm getting a compile error "i , undeclared identifier"

    any ideas?
    Stephen Bazemore
    Email:[email protected]

  6. #6
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    it's here

    for(int c=0;i<188;i++)


    should be

    for(int c=0;c<188;c++)

  7. #7

    Thread Starter
    Addicted Member Stephen Bazemore's Avatar
    Join Date
    Aug 2000
    Location
    North Carolina
    Posts
    158
    Nevermind I got it to compile.. but for some reason it only loops the first character on my screen. any help is appreciated.
    Stephen Bazemore
    Email:[email protected]

  8. #8

    ???

    If you simply want to know what each number represents open a dos window then press control-alt and type in the relevant ascii number. When you let go of all 3 keys the corresponding ascii symbol will appear. Hope this helps.

  9. #9
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    This code works fine for me. (Vlatko's code with errors corrected)

    Code:
    #include <iostream.h>
    
    int main(int argc, char* argv[])
    {
    unsigned char Ascii[187] = {
        	201,176,177,178,219,219,219,219,219,
        	176,177,178,219,219,219,219,219,176,
        	177,178,219,219,178,219,219,205,205,
        	187, 10,186, 32, 32,176,177,178,219,
        	 32, 32,176,177,178,219,219,178,219,
        	219,176,177,178,219,219,178,219,219,
        	 32, 32,186, 10,186, 32, 32,176,177,
        	178,219, 32, 32,176,177,178,219,219,
        	219,219,219,176,177,178,219,219,219,
        	219,219, 32, 32,186, 10,186, 32, 32,
        	176,177,178,219, 32, 32,176,177,178,
        	219,219,178,219,219,176,177,178,219,
        	219,178,219,219, 32, 32,186, 10,186,
        	 32, 32,176,177,178,219, 32, 32,176,
        	177,178,219,219,219,219,219,176,177,
        	178,219,219,178,219,219, 32, 32,186,
        	 10,200,205,205,205,205,205,205,205,
        	205,205,205,205,205,205,205,205,205,
        	205,205,205,205,205,205,205,205,205,
    		205,188, 10, 10, 201, 36, 45};
    	for(int c=0;c<188;c++)
    		cout<<Ascii[c];
    
    	return 0;
    }

    (Hmm, looks like Vlatko forgot to close his code tag)
    Harry.

    "From one thing, know ten thousand things."

  10. #10
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Yes you are right i forgot to close the code tag. About the errors in the code. I first used cout<<Ascii[i] but that was making everything italic(as you can see now haha) and that is why i changed i to c but forgot to change every apperance of c. Never mind that the code works.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Maybe we could get John to disable things like that in [code][/code] tags.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width