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...
Type: Posts; User: hjazz
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...
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.
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.
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;
I've also added a
if (fin.rdstate() & ifstream::failbit) != 0)
printf("failbit set\n");
check right after the
printf("fin is open\n");
Thanks for spotting the mistake. I replaced "donefile" with "tfile", and still got the same output.
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...
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...