title: Compile C program with visual studio
body: <p>I am required to explain what the program located in the following links does:</p>
  
  <p><a href="http://soundeliverance.com:8080/TinyServer/main.c" rel="nofollow noreferrer">main.c</a></p>
  
  <p><a href="http://soundeliverance.com:8080/TinyServer/csapp.c" rel="nofollow noreferrer">csapp.c</a></p>
  
  <p><a href="http://soundeliverance.com:8080/TinyServer/csapp.h" rel="nofollow noreferrer">csapp.h</a></p>
  
  <p>I compile the following code in linux as:</p>
  
  <p>.................................<img src="https://i.stack.imgur.com/wN9Zi.jpg" alt="enter image description here">...........................</p>
  
  <p>(note all three files have to be in the same working directory for compilation to work. )</p>
  
  <p>that command is:  <code>gcc main.c csapp.c</code> </p>
  
  <p>when I execute that command I get the executable:  <code>a.out</code>  <strong>and I get no compilation errors!</strong></p>
  
  <p>That executable file can be downloaded from <a href="http://soundeliverance.com:8080/TinyServer/a.out" rel="nofollow noreferrer">here</a> (I don't think you need that file plus I will not execute that file if I where you).</p>
  
  <p>Anyways I think that if I could debug the program I will be able to understand better what is going on. As a result I have created a C++ console empty console project in visual studio. I will like to include the same files in there and be able to compile it. I have never used c++ before and I don't really understand where to place header files. This is what I have done hoping to be able to compile the program:</p>
  
  <p><img src="https://i.stack.imgur.com/QAz94.jpg" alt="enter image description here"></p>
  
  <p>The program will not compile if I place the files like that. </p>
  
  <p>I have also tried placing all the files in the same directory just like on the linux virtual machine:</p>
  
  <p><img src="https://i.stack.imgur.com/VOTLp.jpg" alt="enter image description here"></p>
  
  <p>that does not compile either.</p>
  
  <p>How will I be able to compile that program with visual studio? </p>