Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by sajiv77

  1. sajiv77

    Getting values from the Structure

    See the program below and see the output. #include <stdio.h> #include <string.h> #define SIZENUMBER 15 typedef unsigned char byte; typedef struct { byte trans_no[SIZENUMBER]; byte s_no[2]; byte abc; }XYZ; main() { XYZ xy; FILE *fp,*fp1...
  2. sajiv77

    Reading /Writing structure

    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...
  3. sajiv77

    Reading a structure

    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...
  4. sajiv77

    Oracle on Linux

    Has anybody installed Oracle on Linux.I have the 9i with me.But iam unable to install. Somebody please guide me about the steps to install . Thanks
  5. sajiv77

    Linux /Windows Non Compatablity on reading files

    Actually the declaration unsigned int two : 3; will take only 3 bits for the variable two.Not 12 bytes as u said.It is not 4*3 it is just 3 bits. I have checked the sizeof unisgned char and unsigned int in both windows and linux.They take 1 and 4 bytes resp.. So whatever is the size iam...
  6. sajiv77

    File Read Problem between Windows and Redhat Linux

    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...
  7. sajiv77

    Linux and Windows file read from C

    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...
  8. sajiv77

    Linux /Windows Non Compatablity on reading files

    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...
  9. sajiv77

    How to use copy using program?

    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
  10. sajiv77

    Shared Memory

    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...
  11. sajiv77

    Linux BootUp messages

    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
  12. sajiv77

    Creating Files From Structures-PROBLEM!!

    First of all by double digit I meant assigning a two digit to unsigned char. For example The assignment- TEST.fTest=11; TEST.cTest =21; This complies but the output from the file read is empty. (or) TEST.fTest='11'; TEST.cTest ='21'; This is the warning I am getting. Structures.cpp: In...
  13. sajiv77

    Creating Files From Structures-PROBLEM!!

    The problem is that I have to use the only typedef unsigned char       byte; typedef struct         {                 byte  nTest[4];                 byte fTest;                 byte cTest; }TEST_T; These strucrtures are given by the client for the project.SO i cannot change it.At the same...
  14. sajiv77

    Creating Files From Structures-PROBLEM!!

    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...

Part and Inventory Search

Back
Top