title: C Program Won't Compile in Visual Studio 2010
body: <p>I have a simple C program that I can compile via command line on Linux easily enough but want to use Visual Studio to debug the program so that I can more easily see what it's doing but I cannot get it to compile.</p>
  
  <p>I have created a new cpp Win32 console application. Added my .c and .h file but I cannot get it to compile. I get 100+ errors that primarily seem to be red herrings. For instance I have an error saying a variable isn't declared when I can see it declared on the line immediately before. For instance:</p>
  
  <pre><code>int i;
  for (i = 0; i &lt; unpacked_length; i++)
  {
  </code></pre>
  
  <p>on the "for" line I get an error: "error C2065: 'i' : undeclared identifier"</p>
  
  <p>So something else is obviously going on. One error that seems legit is this one:</p>
  
  <pre><code>static unsigned char* Base64_Charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  </code></pre>
  
  <p>IntelliSense: a value of type "const char *" cannot be used to initialize an entity of type "unsigned char *"</p>
  
  <p>Since this works when compiling via command line I don't know why the intellisense would be giving this error here unless this compiler has different rules than the other one I used via command line. I haven't done any C for about 15 years and don't know if this could be a difference in compiler or if there is something else going on here.</p>
  
  <p>The only includes in the source are: </p>
  
  <pre><code>#include "dtcrypt.h"
  #include &lt;string.h&gt;
  #include &lt;stdlib.h&gt;
  </code></pre>
  
  <p>Appreciate any help!</p>