How do i wrtie more than one structure to a same file and then read it?
Here is a sample program i wrote.Tell me whats wrong with it
#include <stdio.h>
#define WRD 2
typedef unsigned char byte;
typedef struct
{
byte hr;
byte trans_no[WRD];
} ABC...
Please see this file .I shall tell the problem.
Compile it if on Linux with
g++ FileName.cpp
include <stdio.h>
#define WRD 2
typedef unsigned char byte;
typedef struct
{
byte hr;
byte trans_no[WRD];
} ABC;
main()
{
ABC ab;
ab.hr=10;
*(int...
I have a binary file generated in VC++(Windows) with the fopen and fwrite functions.
Iam able to read the file generated in Windows from Linux with fread but iam getting all wrong values.
I using structures of unsigned char with bit allocation.
Attached is the file code.
First create the file...
I have a binary file generated in VC++(Windows) with the fopen and
fwrite functions.
Iam able to read the file generated in Windows from Linux with fread
but iam getting all wrong values.
I using structures of unsigned char with bit allocation.
Attached is the file code.
First create the...
Hi
I have a binary file generated in VC++(Windows) with the fopen and fwrite functions.
Iam able to read the file generated in Windows from Linux with fread but iam getting all wrong values.
I using structures of unsigned char with bit allocation.
Attached is the file code.
First create the...
Hi
I am writing a program in unix where i need to copy from one locatio to another.
Cananybody help me in that.Is there any functions anybody is aware of?
I dont want to use the system function of unix.
Thanx
Hi
I want to populate a number in the Shared Memory of Linux.
Iam doing the following
This is my header file which contains the Shared memory structures
#ifndef _DATABASE_SHARED_
#define _DATABASE_SHARED_
typedef struct
{
char m_sTransactionNo[15];
} DBShared;
#define _SHM_KEY...
Hi
Can anybody has a clue on how i can supress the messages that i get on Redhat Linux startup.
ie I want to hide the messages that come from the Kernel and show my own messages.
Example - welcome to the ---- Machine.
Any clues
Thanks
Hi
here is what iam trying to do.
->Create a File using structures
And Iam doing that by
1)Populating the structres
2)Putting the structres in a file
But the problem for me is that iam having a stucture which is unsigned char and i have to put double digit in it.
Iam enclosing a sample...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.