title: Finding position of the element in array
body: <p>How can I find position of the element inside an array? I have following piece of code where I need to test if the element is at some position, however it is not working as expected. I need your help about it.</p>
  
  <pre><code>string knockemdead[4], bashemup[4], street[4], newyork[9999];
  string car;
  
      if (knockemdead[i] == car)
      {
  
          if (knockemdead[i].find(1)){ // tried knockemdead[i] = knockemdead[1] and knockemdead[i].at(1) but all it did was nothing
              fare = 10;
          }
          else if (knockemdead[i].find(2))
          {
              fare = 15;
          }
  
          else if (knockemdead[i].at(3) || knockemdead[i].at(4))
          {
              fare = 25;
          }
  </code></pre>