Results 1 to 9 of 9

Thread: can anyone figure out what this is

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    can anyone figure out what this is

    Code:
    	
    char hash2[80] = { 0x0F, 0x0E, 0x1A, 0x11, 0x17, 0x0F, 0x16,
    					   0x1D, 0x12, 0x18, 0x0E, 0x19, 0x0F, 0x17,
    					   0x17, 0x1F };

  2. #2
    Addicted Member
    Join Date
    May 2005
    Posts
    230

    Re: can anyone figure out what this is

    A character array with a maximum length of 80 with 16 of those values filled in with hexadecimal ascii values, I guess.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: can anyone figure out what this is

    so for e.g, take the first hex value 0x0F

    whats that?

  4. #4
    Addicted Member
    Join Date
    May 2005
    Posts
    230

    Re: can anyone figure out what this is

    Those are some strange chars though like shift in, shift out, crap like that.

  5. #5
    Addicted Member
    Join Date
    May 2005
    Posts
    230

    Re: can anyone figure out what this is

    The first one is shift in, the second one is shift out. Go to www.lookuptables.com

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: can anyone figure out what this is

    ah ok thanks. another question while im here

    in c++ a backslah is written as \\ right?

    so if i wanted 10 backslahes would that be 20 \\'s

    char backslahesh[20] = "\\\\\\\\\\\\\\\\\\\\";

    is there any easier way?

    in other langauges i can do something like str(\,20) etc?

  7. #7
    Addicted Member
    Join Date
    May 2005
    Posts
    230

    Re: can anyone figure out what this is

    I'm not sure, I never had to do more than one backslash at a time and I guess I'd just use 20 of them if I needed 10.

  8. #8
    Addicted Member SpS's Avatar
    Join Date
    Jul 2005
    Posts
    201

    Re: can anyone figure out what this is

    Try This
    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
    int i=0;
    	while(i++<20)
    	cout<<"\\"<<endl;
    	return 0;
    }
    #Appreciate others by rating good posts !!

    #The Software Peter Principle is in operation when unwise developers "improve" and "generalize" the software until they themselves can no longer understand it, then the project slowly dies.

    #People who are still ignorant of their ignorance are dangerous.

  9. #9
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: can anyone figure out what this is

    If you want 10 backslashes in a string literal, there's no easier way.
    If you want to fill a std::string with 10 slashes, you can do
    Code:
    std::string str(10, '\\');
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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