Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. int procuraVeiculo(tipoVeiculo vVeiculos[],int contVeiculos, char matricula[])
  2. {
  3. int i;
  4.  
  5. for(i=0; i<contVeiculos; i++)
  6. {
  7. if(strcmp(matricula, vVeiculos[i].matricula) == 0)
  8. {
  9. //se entrar aqui, então as matriculas são iguais!
  10. return i; //devolve a posicao na lista
  11. }
  12. }
  13. return -1; //devolve -1 sempre que nao encontra :(
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement