Search:

Type: Posts; User: hjazz

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,291

    Incorrect result in Bitwise operations

    Hi all,

    I'm doing a bitwise operations on 2 bytes in a buffer, then storing the result in a variable. However, I sometimes get a non-zero value for the variable even though I'm expecting a zero...
  2. Thanks to everybody for your suggestions. It was...

    Thanks to everybody for your suggestions. It was indeed an endian issue and after correcting for it, I'm able to read the bytes in the correct order.
  3. Thank you all for the suggestions, I'll try them...

    Thank you all for the suggestions, I'll try them out and get back with the results. BTW, the sequence of bytes I'm reading from is from a pcap handle, i.e. I'm reading packet data.
  4. Reading a “short” variable into a structure

    Hi,

    I have a sequence of 4 bytes that I wish to read into a structure.

    The structure definition is


    struct A
    {
    u_char Char1;
  5. I've also added a if (fin.rdstate() &...

    I've also added a


    if (fin.rdstate() & ifstream::failbit) != 0)
    printf("failbit set\n");

    check right after the


    printf("fin is open\n");
  6. Thanks for spotting the mistake. I replaced...

    Thanks for spotting the mistake. I replaced "donefile" with "tfile", and still got the same output.
  7. Using fstream to open a file that is created only during runtime

    Hi,

    I'm using Visual C++ 6.0 and I'm trying to use fstream to open and read a file that is created only during runtime. This file is written by another function running on another thread, and my...
  8. Replies
    1
    Views
    2,126

    Using pcap, dirent.h and error C2085, C2061

    Hi all,

    I'm new to using Visual Studio. I'm currently using VS .NET 2003 on Vista, and I'm trying to port a program from Linux to Windows.

    The program uses the pcap library. I have installed...
Results 1 to 8 of 8