title: I am stuck with this code,having doubts about the FILE structure and fopen function
body: <pre><code> typedef struct tagFileheader    
  {
    unsigned short   Type;                  //  00h  File Type Identifier to check if the file is bmp or not
    unsigned int     FileSize;              //  02h  Size of bmp file No.of bytes of the bitmap file           
    unsigned int     PxOffset;              //  0Ah  Offset to bitmap pixel data  
  }Fileheader;
  
   Fileheader filehdr;
   Fileheader *pFileheader = &amp;filehdr;
  
   unsigned short Get16U(unsigned int *x)
   {
       unsigned short temp;
       temp = *x &amp; (0xFFFF);
       return temp;
   }  
  
   unsigned int Get32U(unsigned int *x)
   {
      unsigned int temp;
      temp = *x ;
      return temp; 
   }
  
   int Get32(unsigned int *x)
   {
      int temp;
      temp = *x ;
      return temp; 
   }
  
  void main()
  {
      unsigned int headersize,i ;  
  
      bAddress = fopen("D:/Tapan/Projects/Jacquard/BMP/03Body.bmp","rb");  // open the file and send the start address of its memory location                               
  
      pFileheader-&gt;Type = Get16U(bAddress);                 // save the first two bytes of bmp file data 
      (char*)bAddress++;
      (char*)bAddress++;                                    // increment the address by 2 bytes to reach address of "Filesize" parameter 
  
      if(pFileheader-&gt;Type == bmpSIGNATURE)                 // read further bytes of the FILE header and INFO header only if the file is a bitmap 
       { 
  
          pFileheader-&gt;FileSize   = Get32U(bAddress);         // save the filesize
          bAddress = bAddress + 2;                            // increment the address by 8 bytes to reach address of "offset" parameter
  
          pFileheader-&gt;PxOffset    = Get32U(bAddress);        // save the offset
          bAddress++;                                         // increment the address by 4 bytes to reach address of "info header size" parameter
       }
  }
  </code></pre>
  
  <p>Here is my code.
  My main intention in this code is to read the bmp file header.I want to declare a pointer which will hold the start address of the buffer which will be created by fopen().And using that start address i will read the data from buffer.
  I am using this code in ARM controller.
  This is not the full code.</p>
  
  <p>Before main i have declared bAddress globally as -</p>
  
  <pre><code>unsigned int *bAddress
  </code></pre>
  
  <p>When i compile the code i get following error -- a value of type "int" cannot be assigned to an entity of type "unsigned int*'
  Now mY question is that,is my pointer declaration correct?
  I have seen FILE being used to declare a pointer variable for fopen()
  How should i use FILE here.How should i declare the structure of FILE</p>