title: Why won't this C++ program compile and run?
body: <p>I tried to run a basic C++ file in the terminal:</p>
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main() {
      cont &lt;&lt; &quot;This is my first C++ program!&quot;;
      return 0
  }
  </code></pre>
  <p>And then tried to run it in the terminal:</p>
  <pre><code>make learningCPP.cpp
  
      make: *** No rule to make target `learningCPP.cpp'.  Stop.
  </code></pre>
  <p>And tried:</p>
  <pre class="lang-none prettyprint-override"><code>make learningCPP
  
      make: *** No rule to make target `learningCPP'.  Stop.
  </code></pre>
  <p>And tried:</p>
  <pre class="lang-none prettyprint-override"><code>gcc learningCPP.cpp -o learningCPP.out
  
      clang: error: no such file or directory: 'learningCPP.cpp'
      clang: error: no input files
  </code></pre>
  <p>Here is the entire Bash/Clang file:</p>
  <pre class="lang-none prettyprint-override"><code>Last login: Mon May 25 07:49:21 on console
  
  make learningCPP.cpp
  
      make: *** No rule to make target `learningCPP.cpp'.  Stop.
  
  make learningCPP
  
      make: *** No rule to make target `learningCPP'.  Stop.
  
  gcc learningCPP.cpp -o learningCPP.out
  
      clang: error: no such file or directory: 'learningCPP.cpp'
      clang: error: no input files
  
  $ g++ -o lab21 learningCPP.cpp
  
      -bash: $: command not found
  
  $ ./lab21
  
      -bash: $: command not found
  
  ./learningCPP.cpp
  
      -bash: ./learningCPP.cpp: No such file or directory
  
  ./main
  
      -bash: ./main: No such file or directory
  
  $ g++ -o main learningCPP.cpp
  
      -bash: $: command not found
  
  cpp
  
  make learningCPP.cpp
  
  run
  </code></pre>
  <p>How can I fix it?</p>