title: How to write a bash file to compile and execute a c++ program
body: <p>I'm practically done with my project, all I need now is to write a bash script that should compile and execute the program. My instructions are that we should provide a script that should compile the program and the instructor should be able to run the program by typing in Project1 Value1 Value2. I'm kinda lost on this one, so any help would be appreciated. </p>
  
  <p>I have tried to compile the program by running this script</p>
  
  <pre><code>#!/bin/bash
  echo $1
  echo $2
  g++ -std=c++11 Project2.cpp -lpthread -o project1
  ./project1 $1 $2
  </code></pre>
  
  <p>Edit</p>
  
  <pre><code>#!/bin/bash
  g++ -std=c++11 Project2.cpp -lpthread -o project1
  </code></pre>
  
  <p>I thought about it a bit more, and I think my second version is closer to what I would like my script to do. Except I was hoping to be able to execute the program without using ./ if possible. </p>