title: Struct in C. Unknown type name,
body: <p>I am new to structures in C but as far as I know, my code is "correct". I am using Codeblocks but I've also compiled it in DEV C++ and I got the same error</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  struct film{
     int year;
     char  title[30];
     char  director[30];
     char  main_char[30];
  } ;
  
  
  int main ()
  {
  
      film venom={ 2018, "Venom", "Ruben Fleischer", "Tom Hardy" };
  
      printf("Year: %d\n", venom.year);
      printf("Title: %s\n", venom.title);
      printf("Director: %s\n", venom.director);
      printf("Main Character: %s\n", venom.main_char);
  
      system("PAUSE");
      return 0;
  
  }
  </code></pre>
  
  <p>I have not idea what is the error about. <a href="https://i.stack.imgur.com/8ZRLq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8ZRLq.png" alt="enter image description here"></a></p>