title: Passing structs to functions
body: <p>I am having trouble understanding how to pass in a struct (by reference) to a function so that the struct's member functions can be populated. So far I have written:</p>
  <pre><code>bool data(struct *sampleData)
  {
  
  }
  
  int main(int argc, char *argv[]) {
  
        struct sampleData {
      
          int N;
          int M;
          string sample_name;
          string speaker;
       };
           data(sampleData);
  
  }
  </code></pre>
  <p>The error I get is:</p>
  <blockquote>
  <p>C++ requires a type specifier for all declarations
  bool data(const &amp;testStruct)</p>
  </blockquote>
  <p>I have tried some examples explained here: <a href="https://stackoverflow.com/questions/2212354/simple-way-to-pass-temporary-struct-by-value-in-c">Simple way to pass temporary struct by value in C++?</a></p>
  <p>Hope someone can Help me.</p>