Search:

Type: Posts; User: CaptainMorgan

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    16
    Views
    19,093

    Here's my attempt at checking fread for the...

    Here's my attempt at checking fread for the correct return values... which I might they weren't returning. However, still no correct values from binary to output.



    // ProjectThreeSourceA.c
    //...
  2. Replies
    16
    Views
    19,093

    Matt, thanks for the great info. That particular...

    Matt, thanks for the great info. That particular implementation might be a little advanced for me. I understand what boyer-moore does in concept but have never implemented it before.

    Here's an...
  3. Replies
    16
    Views
    19,093

    Here's what I've come up with thus far. I know...

    Here's what I've come up with thus far. I know that there are three files to be found in the input binary file. The three files are found with this little program and written to the output file with...
  4. Replies
    16
    Views
    19,093

    yea.. I did figure out that it's just comparing...

    yea.. I did figure out that it's just comparing addresses... but I don't know how to compare them... if I do tempBuffer == pattern that's comparing a pointer to an int and that doesn't work
  5. Replies
    16
    Views
    19,093

    Would the bold be placed in a while loop? or no?...

    Would the bold be placed in a while loop? or no? wait.. yes.. right? I'm still not understanding how to literally match the pattern to a value found using fread().. notice I tried:


    if...
  6. Replies
    16
    Views
    19,093

    Here's what I have so far, I am simply trying to...

    Here's what I have so far, I am simply trying to find the matching hex and output it. it does nothing but compile and outputs nothing but "Done!....".



    // The first three lines make the...
  7. Replies
    16
    Views
    19,093

    Mac, from what I can tell, that link shows why...

    Mac, from what I can tell, that link shows why not to use.. but doesn't give an example of successfully using it, in fact it's rewritten to take fgets() in the while condition.

    I was thinking:
    ...
  8. Replies
    16
    Views
    19,093

    Ok, so I've changed the code quite a bit thanks...

    Ok, so I've changed the code quite a bit thanks to you folks. I guess my underlying problem is understanding this: If I can read in successive characters using fgetc, what then is the strategy within...
  9. Replies
    16
    Views
    19,093

    Searching Binary Files for a Pattern

    I am having much trouble trying to figure this out. I am trying to search for the hex pattern(which you can find in the below program source) in a binary file and output to another file the files...
  10. :confused:

    :confused:
  11. Replies
    64
    Views
    12,760

    bravo ;)

    bravo ;)
  12. Replies
    64
    Views
    12,760

    actually, you're probably quite accurate. He is a...

    actually, you're probably quite accurate. He is a Java programmer by trade and was forced to teach C++ this past semester by the dept head.
  13. Replies
    64
    Views
    12,760

    That is what my instructor was implying so we're...

    That is what my instructor was implying so we're in trouble.
  14. Replies
    64
    Views
    12,760

    My instructor this past fall claimed that an...

    My instructor this past fall claimed that an equivalent program that was originally written in C++ is actually faster when written in Java. So should I strangle him?


    -Capt
  15. Replies
    1
    Views
    1,139

    Seg Fault AFTER the program finishes..

    Below is a method that properly deletes a Professor from a list of Professors.

    If this method is not called(as there are other options in the menu) then the program terminates just fine. However,...
  16. I suppose this is a stupid question?

    I suppose this is a stupid question?
  17. Linked List Class with Pointers to Objects and using Polymorphism

    I am having the most difficult time setting up a linked list class of objects in a heirarchy while incorporating polymorphism. The below represents a test case, and I couldn't even get this to work!...
  18. Ah... thank you.

    Ah... thank you.
  19. Passing Objects to Constructors and Receiving a Logic Error

    If anyone would be so kind... I do not know why I am receiving the below error. Desired output is also given.


    Foobasesbase::Foobasesbase( const string& one, const string& two, const string&...
  20. Sure we can.

    Sure we can.
  21. Kennedy, all of which I consider reasonable but...

    Kennedy, all of which I consider reasonable but also more to the effect of optimization issues and styling rather than 'problems'. Primarily things such as 'considered', 'not wrong, but not common',...
  22. Care to elaborate? Because with what the OP...

    Care to elaborate? Because with what the OP wanted, and run from a Linux environment with the gcc compiler there are no warnings or errors and the program runs as requested producing the correct...
  23. Your best bet is to do it dynamically. ...

    Your best bet is to do it dynamically.


    kris.c gives an example of why and is a better solution.


    To memory! :)
  24. Btw, what is it that you're trying to accomplish...

    Btw, what is it that you're trying to accomplish exactly, besides the resolution of compilation errors.

    I've got a working copy of it producing:

    This
    is
    an
    example
    file.
  25. Echoing what Salem said... and this may be of...

    Echoing what Salem said... and this may be of some help:
    http://www.cprogramming.com/tutorial/cfileio.html
Results 1 to 25 of 46
Page 1 of 2 1 2