title: C error: expected declaration specifiers or '...' before '*' token
body: <p>so I'm learning data structures and pretty much new to C. I am trying to make a function that accepts student id and the course number and the output would be the student name and course name. I'm currently stuck at the input part. Here's the code I have so far:</p>
  <pre><code>typedef struct Student Student;
  typedef struct Course Course;
  typedef struct Node Node;
  typedef struct Node* NodePtr;
  
  struct Student{
      int id;
      char name[30];
      double gpa;
      int ch;
  };
  
  struct Course{
      int id;
      char code[10];
      char name[30];
      int ch;
  };
  
  void displayStudents() {
  
       struct Student students[10]={
          {1, &quot;ahmed&quot; ,3.6,43},
          {2, &quot;mohamed&quot;, 3.2, 40},
          {3,&quot;hassan&quot;, 3.0, 41},
          {4, &quot;hossam&quot;, 2.5, 35},
          {5, &quot;hany&quot;, 2.3, 32},
          {6, &quot;hala&quot;, 2.7, 37},
          {7, &quot;hana&quot;, 2.8, 33},
          {8, &quot;ramadan&quot;,3.8,46},
          {9, &quot;sameh&quot;,3.7,43},
          {10, &quot;nour&quot;,3.3,42}
       };
  
        for(int i=0; i&lt;10; i++) {
          printf(&quot;%d,%s,%lf, %d&quot;, students[i].id, students[i].name, students[i].gpa, students[i].ch);
          printf(&quot;\n&quot;);
        }
  
  }
  
  void displayCourses() {
  
      struct Course courses[3] = {
      {30, &quot;CS212&quot;, &quot;DataStructure&quot;, 3},
      {40, &quot;CS233&quot;, &quot;Architecture&quot;, 3},
      {50, &quot;GM300&quot;, &quot;Multimedia&quot;, 3}
  
      };
  
      for (int i=0; i&lt;3; i++) {
  
          printf(&quot;%d - %s - %s - %d&quot;, courses[i].id, courses[i].code, courses[i].name, courses[i].ch);
          printf(&quot;\n&quot;);
      }
  
  
  }
  
  void Registeration(struct Student student, *struct Course courses) {
  
            printf(&quot;Select a student: \n&quot;);
            gets(student.name);
            printf(&quot;Enter his ID: &quot;);
            scanf(&quot;%d&quot;, &amp;student.id);
            printf(&quot;Select a course: &quot;);
            scanf(&quot;%d&quot;,&amp;course.id);
  
  
  }
  </code></pre>
  <p>I'm getting the error in the registeration function. I tried removing the pointer but it caused other problems, I've also tried lots of other stuff but to no avail.</p>
  <p>Here's the error:</p>
  <pre><code>||=== Build: Debug in Data Structure Project (compiler: GNU GCC Compiler) ===|
  C:\Users\Shiko\Desktop\C Tutorials\Data structure project\main.c|155|error: expected declaration specifiers or '...' before '*' token|
  ||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
  </code></pre>