Ver Mensaje Individual
  #8
Antiguo 19 de abril de 2017, 18:53
Kuk
Administrador
Última Actividad 19.09.2026 20:11
Posts Posts: 2.500
Likes enviados Enviados: 1037
Likes recibidos Recibidos: 1207

FabioYeyo, a mi tampoco me funciona con tu OBJ...

Oye, nunca he visto esta sintaxis:

Código CPP:
  1. /**********************************************************************/
  2. /*       pos(s,c) donne la premiere occurence du caractere c          */
  3. /*                dans la chaine de caracteres s                      */
  4. /**********************************************************************/
  5.  
  6. UCHAR pos(s,c)
  7. UCHAR s[];
  8. UCHAR c;
  9. {
  10.   UCHAR i;
  11.  
  12.   i=0;
  13.   while ((s[i] != c) && (s[i] != '\0') && (i<255))
  14.   {
  15.     i++;
  16.   }
  17.   return(i);
  18. }

O sea, declarando una función con 2 parámetros sin indicar su tipo, y luego justo debajo declarar dichos campos... De hecho, a mi ni me compila sin modificarlo en:

Código CPP:
  1. /**********************************************************************/
  2. /*       pos(s,c) donne la premiere occurence du caractere c          */
  3. /*                dans la chaine de caracteres s                      */
  4. /**********************************************************************/
  5.  
  6. UCHAR pos(UCHAR s[], UCHAR c)
  7. {
  8.   UCHAR i;
  9.  
  10.   i=0;
  11.   while ((s[i] != c) && (s[i] != '\0') && (i<255))
  12.   {
  13.     i++;
  14.   }
  15.   return(i);
  16. }

¿Con qué compilador lo has compilado (y obtenido el OBJ)?



NORMAS DEL FORO - para garantizar el buen funcionamiento del Foro.
¿Te han ayudado? NO TE OLVIDES de darle a
¿Quieres dirigirte a alguien en tu post? Notifícale haciendo clic en su Nick
Kuk is offline   Responder Con Cita