title: Visual Studio "illegal use of this type as an expression"
body: <p>I've just started using Visual Studio (I got VS 2012 from dreamspark, and it hasn't been long since I've started using Windows again) and I'm having some trouble.</p>
  
  <p>I have a single file named "main.c" under my Source Files folder that looks like this:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  typedef struct S_s S;
  struct S_s {
      void* x;
  };
  
  int main(int argc, char** argv)
  {
      int N;
      scanf("%d", &amp;N);
  
      S* s;
      printf("%p", s);
  
      return 0;
  }
  </code></pre>
  
  <p>And when I try to build it gives me the following error messages:</p>
  
  <pre><code>Error   3   error C2065: 's' : undeclared identifier    c:\users\math4tots\documents\visual studio 2012\projects\algorithms\lecture1\main.c 13  1   Lecture1
  Error   4   error C2065: 's' : undeclared identifier    c:\users\math4tots\documents\visual studio 2012\projects\algorithms\lecture1\main.c 14  1   Lecture1
  Error   2   error C2275: 'S' : illegal use of this type as an expression    c:\users\math4tots\documents\visual studio 2012\projects\algorithms\lecture1\main.c 13  1   Lecture1
  </code></pre>
  
  <p>The funny thing is that it builds just fine if I comment out the <code>scanf</code> line.</p>
  
  <p>I did create an "Empty project" under the "Visual C++" options so I wasn't sure if VS compiled it as a C or C++ program. However, I was under the impression that my code was C/C++ agnostic enough that it should compile in either C or C++.</p>
  
  <p>What can I do to get this to build while still maintaining the semantics of the program?</p>