title: Errors while fixing errors in C
body: <p>I have one .c file and two headers. I don't have a qlue why these errors appered. I was trying to find solutions in the net but couldn't apply it to my code.</p>
  
  <p>Structs.h</p>
  
  <pre><code>#ifndef STRUCTS_H
  #define STRUCTS_H
  
  typedef struct stream
  {
      char* enc; //binary string
      int pos;
  }stream;
  
  typedef struct tag
  {
      int tagClass;
      char tagConstructed;
      char tagNumber;
  }tag;
  
  #endif
  </code></pre>
  
  <p>Funcs.h Errors:</p>
  
  <pre><code>Error   22  error C2143: syntax error : missing '{' before '&amp;'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    15  1   asn1
  Error   26  error C2143: syntax error : missing '{' before '&amp;'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    36  1   asn1
  Error   21  error C2143: syntax error : missing ')' before '&amp;'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    15  1   asn1
  Error   25  error C2143: syntax error : missing ')' before '&amp;'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    36  1   asn1
  Error   15  error C2061: syntax error : identifier 'isUniversal'    c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    3   1   asn1
  Error   18  error C2061: syntax error : identifier 'isEOC'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    7   1   asn1
  Error   17  error C2059: syntax error : 'type'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    3   1   asn1
  Error   20  error C2059: syntax error : 'type'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    7   1   asn1
  Error   16  error C2059: syntax error : ';' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    3   1   asn1
  Error   19  error C2059: syntax error : ';' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    7   1   asn1
  Error   24  error C2059: syntax error : ')' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    15  1   asn1
  Error   28  error C2059: syntax error : ')' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    36  1   asn1
  Error   23  error C2059: syntax error : '&amp;' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    15  1   asn1
  Error   27  error C2059: syntax error : '&amp;' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    36  1   asn1
  
  
  #ifndef FUNCS_H
  #define FUNCS_H
  
  #include "Structs.h"
  
  bool isUniversal(tag curTag);
  bool isEOC(tag curTag);
  char getByte(stream curStream);
  void parseTag(stream &amp; str, tag &amp; tag);
  char parseLength(stream &amp; str);
  
  #endif
  </code></pre>
  
  <p>Functions.c Errors:</p>
  
  <pre><code>Error   22  error C2143: syntax error : missing '{' before '&amp;'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    15  1   asn1
  Error   26  error C2143: syntax error : missing '{' before '&amp;'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    36  1   asn1
  Error   21  error C2143: syntax error : missing ')' before '&amp;'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    15  1   asn1
  Error   25  error C2143: syntax error : missing ')' before '&amp;'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    36  1   asn1
  Error   15  error C2061: syntax error : identifier 'isUniversal'    c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    3   1   asn1
  Error   18  error C2061: syntax error : identifier 'isEOC'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    7   1   asn1
  Error   17  error C2059: syntax error : 'type'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    3   1   asn1
  Error   20  error C2059: syntax error : 'type'  c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    7   1   asn1
  Error   16  error C2059: syntax error : ';' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    3   1   asn1
  Error   19  error C2059: syntax error : ';' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    7   1   asn1
  Error   24  error C2059: syntax error : ')' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    15  1   asn1
  Error   28  error C2059: syntax error : ')' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    36  1   asn1
  Error   23  error C2059: syntax error : '&amp;' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    15  1   asn1
  Error   27  error C2059: syntax error : '&amp;' c:\users\natasha\documents\visual studio 2012\projects\asn1\asn1\functions.c    36  1   asn1
  
  
  #include "Funcs.h"
  
  bool isUniversal(tag curTag) {
      return curTag.tagClass == 0x00;
  }
  
  bool isEOC(tag curTag) {
      return (curTag.tagClass == 0x00) &amp;&amp; (curTag.tagNumber == 0x00);
  }
  
  char getByte(stream curStream) {
      return curStream.enc[curStream.pos];
  }
  
  void parseTag(stream &amp; str, tag &amp; tag)
  {
      char buf, tempNumber;
      buf = getByte(str);
      tempNumber = 0x00;
      tag.tagClass = buf &gt;&gt; 6;
      tag.tagConstructed = ((buf &amp; 0x20) != 0);
      tag.tagNumber = buf &amp; 0x1F;
      if (tag.tagNumber == 0x1F)
      {
          do
          {
              str.pos++;
              buf = getByte(str);
              tempNumber = (tempNumber &lt;&lt; 7) | (buf &amp; 0x7F);
          }while(buf &amp; 0x80);
  
          tag.tagNumber = tempNumber;
      }
  }
  
  char parseLength(stream &amp; str) {
      char buf, len;
      int numberOfOctets, i;
      buf = getByte(str);
      len = 0x00;
      numberOfOctets = 0;
      if (buf &lt; 0x80) {
          len = buf; //short form
      } else { //long form
          numberOfOctets = buf &amp; 0x7F;
          for (i = 0; i &lt; numberOfOctets; ++i) {
              len = (len * 256) + getByte(str);
              str.pos++;
          }
      }
  
      return len;
  }
  </code></pre>