initializing hex?

This is a discussion on initializing hex? within the C++ Programming forums, part of the General Programming Boards category; so right now i am reading in four characters at a time from my input file. my problem happens when ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    initializing hex?

    so right now i am reading in four characters at a time from my input file. my problem happens when there is only one character to read. I need to initialize these other three characters so they don't print out anything, but right now they are initializing to hex values "-52," each one of them. I tried making them zero, but i don't think that's what i want, because it still is printing out zeros in the hex editor. is there a way to initialize these characters so they don't print anything, zeroes or otherwise?

    keith

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    post some code. I'm not sure I understand you. You want to read 4 chars but ignore 3 of the 4?
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    291
    they are initializing to hex values "-52,"
    Is that a hex value ? Do you mean "52" ?

    Since dont know what you've done so far it's a bit hard to help out. Maybe this example helps out - http://www.cplusplus.com/ref/iostream/istream/read.html

  4. #4
    Registered User
    Join Date
    Jul 2003
    Posts
    27
    nevermind. i'm dumb, and figured out my problem. thanks

  5. #5
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    this guy's a riot. Go keithmolo!
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ascii to hex and hex to Ascii
    By beon in forum C Programming
    Replies: 1
    Last Post: 12-26-2006, 06:37 AM
  2. Hex Editing help and information please...
    By SG57 in forum C Programming
    Replies: 9
    Last Post: 06-25-2006, 01:30 AM
  3. Replies: 11
    Last Post: 03-24-2006, 11:26 AM
  4. Replies: 3
    Last Post: 01-23-2006, 07:25 PM
  5. Is binary HEX?
    By Budgiekarl in forum Tech Board
    Replies: 11
    Last Post: 11-23-2003, 09:02 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21