Thread: Help with a code (beginner)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Quote Originally Posted by LK93 View Post
    But why should i convert hex 0x30 to bin 110000?
    You could convert it to 00110000.0000 if you wanted, but what's the point? Extra zeros are discarded because they are insignificant.

    EDIT: It's like saying "Should I write seven as 7.0 or 7.00?" Say what?!
    Devoted my life to programming...

  2. #2
    Registered User
    Join Date
    Sep 2012
    Posts
    6
    Quote Originally Posted by GReaper View Post
    You could convert it to 00110000.0000 if you wanted, but what's the point? Extra zeros are discarded because they are insignificant.

    EDIT: It's like saying "Should I write seven as 7.0 or 7.00?" Say what?!
    Okej, but why should i convert it from 0x30 to 110000? What happens in the code?

    And what does TGA_FLIP_MASK means?

    I am really sorry for my questions, i know i sound retarded but i am just trying to get it...
    Last edited by LK93; 09-23-2012 at 02:57 PM.

  3. #3
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Quote Originally Posted by LK93 View Post
    Okej, but why should i convert it from 0x30 to 110000? What happens in the code?
    You don't convert anything. You just print it on a different base. Everything in the code is encoded to binary.

    Quote Originally Posted by LK93 View Post
    And what does TGA_FLIP_MASK means?
    Wow, I simply don't know and can't find any info on that!
    [wild_guess] It's a preprocessor constant for Targa image files to get if the image should be flipped or not, through a bitfield [/wild_guess]
    Devoted my life to programming...

  4. #4
    Registered User
    Join Date
    Sep 2012
    Posts
    6
    Quote Originally Posted by GReaper View Post
    You don't convert anything. You just print it on a different base. Everything in the code is encoded to binary.


    Wow, I simply don't know and can't find any info on that!
    [wild_guess] It's a preprocessor constant for Targa image files to get if the image should be flipped or not, through a bitfield [/wild_guess]
    Okey, thanks!

    For some reasons i don't want to post the entire code here... I know this is much to ask for, but do you have time to help me with the code on email or some chat function?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner code assistance
    By akust0m in forum C Programming
    Replies: 6
    Last Post: 08-07-2012, 09:29 PM
  2. help me with this code [beginner]
    By fredsilvester93 in forum C++ Programming
    Replies: 1
    Last Post: 01-21-2012, 03:41 PM
  3. A beginner's code, need suggestion
    By sumitsatsangi in forum C++ Programming
    Replies: 7
    Last Post: 01-21-2012, 06:00 AM
  4. Problem with beginner code... please help
    By rkrajnov in forum C Programming
    Replies: 2
    Last Post: 09-25-2010, 11:47 PM
  5. beginner here need help with an array code
    By Ohshtdude in forum C++ Programming
    Replies: 6
    Last Post: 02-01-2009, 05:42 PM