title: Pointer - Reference vector
body: <p>I'm used to program in C# or Java, so I'm doing really bad in C++. I believe it's easy but I just can't make this work. Please help me.</p>
  
  <p>I have this:</p>
  
  <pre>
  <code>
  void swap(vector  * vet, int i, int j)
  {
      int temp = vet[i];
      vet[i] = vet[j];
      vet[j] = temp;
  }
  </code>
  </pre>
  
  <p>I'm calling the method this way:</p>
  
  <pre>
  <code>
  swap(&vet, j, j - 1);
  </code>
  </pre>
  
  <p>What I want is to pass the vector using pointers instead of using value. </p>
  
  <p>Obs: The code compiles well without the "*" and "&amp;".</p>
  
  <p>Please don't say that I have to at least try to study pointers, because I did. I just can't make this damn thing work!</p>