having troubles

This is a discussion on having troubles within the C++ Programming forums, part of the General Programming Boards category; I'm having major troubles with a project I'm working on. I'm trying to design a hex viewer(soon to be editor) ...

  1. #1
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640

    having troubles

    I'm having major troubles with a project I'm working on. I'm trying to design a hex viewer(soon to be editor) and I'm having alot of problems. I'm posting my code for anyone to take a look at and see if they can help me. The code compiles fine (Turbo C++ 3.0) but the biggest problem I have is trying to display 16 bytes one a single line. I would recommend creating a small text file with a sentence or two in it to test my code on. Thanks for any help.
    Attached Files Attached Files
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  2. #2
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640
    no one is willing to help?
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    I'd like everyone who's as goddam sick of thread bumping as I am to reply to this. What do these people do in the 2 days between when they ask for help and return to the boards to irritate people? Hibernate? Work on a novel? Because, I have NEVER, EVER seen someone come back a couple days later and bump their threads saying "I tried this, this, and this, and I got this part working, but this is still giving me problems". It's always "Why won't anyone help me? There was at least 1 time since I posted that I almost looked at my code, but then I decided, nah, let the guys at cprog look at it!"


  4. #4
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640
    because usually I post after I have been stuck for several days. Even a post from someone of the two people who downloaded my code would be nice.
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  5. #5
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    Well, maybe if you had given a good description of the problem, and posted the code giving you errors more people would've been willing to help, and you wouldnt've needed to annoy everyone by bumping your own thread.

  6. #6
    ...
    ... is offline
    Registered User
    Join Date
    Feb 2002
    Posts
    465
    Originally posted by Govtcheez
    Because, I have NEVER, EVER seen someone come back a couple days later and bump their threads saying "I tried this, this, and this, and I got this part working, but this is still giving me problems".
    hey, *I* have done this! so dont say youve never seen anyone do it...

    ... unless of course you didnt read that thread...


    *edited to add proof* http://www.cprogramming.com/cboard/s...threadid=12053
    Last edited by ...; 03-07-2002 at 05:35 PM.
    I came up with a cool phrase to put down here, but i forgot it...

  7. #7
    Registered User Sekti's Avatar
    Join Date
    Feb 2002
    Posts
    163

    ahhh

    stop the flamming...
    +++
    ++
    + Sekti
    ++
    +++

  8. #8
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640
    well, I've stated the problem in the first post.
    "...but the biggest problem I have is trying to display 16 bytes one a single line"

    In a while loop, I'm trying to display 16 bytes of a file, very much like this:

    while ((getbyte=fgetc(MainInput)) != EOF) {
    for(int j=0;<15;j++) {
    newbyte=fgetc(MainInput);
    printf("%X ",newbyte);
    }
    fseek(MainInput,SEEK_CUR - 16, SEEK_CUR);

    for (j=0;j<15;j++) {
    newbyte=fgetc(MainInput);
    if (newbyte>=32 && newbyte<=127){
    printf("%c",newbyte);
    }
    else {
    printf("%c",0xB1);
    }
    }
    //fseek(MainInput,SEEK_CUR - 16, SEEK_CUR);
    }


    But I'm getting weird output.
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Clock Troubles
    By _Nate_ in forum C Programming
    Replies: 22
    Last Post: 06-19-2008, 05:15 AM
  2. Replies: 4
    Last Post: 01-15-2006, 04:14 AM
  3. Console-based file i/o troubles
    By Callith in forum C++ Programming
    Replies: 3
    Last Post: 12-25-2004, 08:22 PM
  4. sscanf troubles
    By williams75 in forum C Programming
    Replies: 5
    Last Post: 11-17-2002, 01:51 AM
  5. More Program Troubles...
    By face_master in forum Windows Programming
    Replies: 2
    Last Post: 08-01-2002, 05:40 AM

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