Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/09/2012, 09:26
Avatar de L3m0n
L3m0n
 
Fecha de Ingreso: diciembre-2011
Mensajes: 219
Antigüedad: 12 años, 4 meses
Puntos: 46
Respuesta: error [Linker error] undefined reference to `mayoritario(float, float)'

Bueno, el codigo tiene un problema simple, y es que la declaracion de la funcion y esta misma no son iguales:
Código C:
Ver original
  1. bool mayoritario (float, float);
  2. bool mayoritario (float vector [10], float n)
  3. //error no son iguales

Ahora tienes dos soluciones:

Solucion 1: borra la linea
Código C:
Ver original
  1. bool mayoritario (float, float);
Ya que si has escrito la funcion antes del main no es necesario ponerlo otra vez antes.

Solucion 2:

Sustituir
Código C:
Ver original
  1. bool mayoritario (float, float);

por
Código C:
Ver original
  1. bool mayoritario (float vector [10], float n)



Saludos.