title: Defining an int with "if' statements using another "int" as a parameter
body: <p>Trying to make an input-dependant variable with an int by changing it's values with if statements. Probably doing a dumb mistake, but so far, can't figure it out (As a side note, also tried with a Switch statement, couldn't make it work either).</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
          
          int main(){
              
              int jobID;
              std::cin &gt;&gt; jobID;
  
              int setjobSalary (int jobSalary) {
                  
                  if (jobID == 1) {
                      
                      setjobSalary = 600;
                      
                      }
                  
                  else if (jobID == 2) {
                      
                      setjobSalary = 1600;
                      
                      }
                  
                      return jobSalary;
                  }
                  
              int currentjobSalary = jobSalary - 300;
              }
  </code></pre>
  <p>Thanks in advance.</p>