pant0307 de Marzo del 2010
PreguntaHola soy nuevo en este foro y tambien en programación en lenguaje C.
El caso es que tengo que entregar un trabajo el lunes y, poco despues de empezarlo me sale un error en estructuras, el problema esque no puedo preguntarselo al profesor porque hasta el lunes no lo veo. A ver si alguien le puede echar un vistazo porque seguro que es una chorrada como siempre. Os pongo las estructuras nada más que es lo que falla. A por cierto, uno CodeBlocks.
#include <stdio.h>
#include <stdlib.h>
#define TALLA 25
#define MAXPILOTOS 30
#define MAXPATROCINADOR 25
#define MAXESC 20
#define MAXCIRC 30
#define MAXCARR 30
struct Escuderias {
char NombreEscuderia [TALLA+1];
char Director [TALLA+1];
float Presupuesto;
char Sede [TALLA+1];
struct Pilotos listapilotos[MAXPILOTOS+1];
int tallapilotos;
struct Patrocinador listapatrocinador[MAXPATROCINADOR+1];
int tallapatrocinador;
};
struct Pilotos {
char NombrePiloto [TALLA+1];
float Sueldo;
char Situacion [TALLA+1];
};
struct Patrocinador {
char NombrePatrocinador [TALLA+1];
float PresupuestoPatrocinador;
};
struct Circuitos {
char NombreCircuito [TALLA+1];
char Ciudad [TALLA+1];
char Pais [TALLA+1];
char Fecha [TALLA+1];
};
struct Carreras {
char Circuito [TALLA+1];
char Piloto[TALLA+1];
float TiempoPiloto;
};
struct Temporada {
struct Escuderias listaescuderias[MAXESC+1];
int tallaescuderia;
struct Circuitos listacircuitos[MAXCIRC+1];
int tallacircuito;
struct Carreras listacarreras [MAXCARR+1];
int tallacarreras;
};
_________________________________________________
los errores en cuestion:
||=== P-Ejer18_Formula1, Debug ===|
error: field `listapilotos' has incomplete type
error: field `listapatrocinador' has incomplete type
El caso es que tengo que entregar un trabajo el lunes y, poco despues de empezarlo me sale un error en estructuras, el problema esque no puedo preguntarselo al profesor porque hasta el lunes no lo veo. A ver si alguien le puede echar un vistazo porque seguro que es una chorrada como siempre. Os pongo las estructuras nada más que es lo que falla. A por cierto, uno CodeBlocks.
#include <stdio.h>
#include <stdlib.h>
#define TALLA 25
#define MAXPILOTOS 30
#define MAXPATROCINADOR 25
#define MAXESC 20
#define MAXCIRC 30
#define MAXCARR 30
struct Escuderias {
char NombreEscuderia [TALLA+1];
char Director [TALLA+1];
float Presupuesto;
char Sede [TALLA+1];
struct Pilotos listapilotos[MAXPILOTOS+1];
int tallapilotos;
struct Patrocinador listapatrocinador[MAXPATROCINADOR+1];
int tallapatrocinador;
};
struct Pilotos {
char NombrePiloto [TALLA+1];
float Sueldo;
char Situacion [TALLA+1];
};
struct Patrocinador {
char NombrePatrocinador [TALLA+1];
float PresupuestoPatrocinador;
};
struct Circuitos {
char NombreCircuito [TALLA+1];
char Ciudad [TALLA+1];
char Pais [TALLA+1];
char Fecha [TALLA+1];
};
struct Carreras {
char Circuito [TALLA+1];
char Piloto[TALLA+1];
float TiempoPiloto;
};
struct Temporada {
struct Escuderias listaescuderias[MAXESC+1];
int tallaescuderia;
struct Circuitos listacircuitos[MAXCIRC+1];
int tallacircuito;
struct Carreras listacarreras [MAXCARR+1];
int tallacarreras;
};
_________________________________________________
los errores en cuestion:
||=== P-Ejer18_Formula1, Debug ===|
error: field `listapilotos' has incomplete type
error: field `listapatrocinador' has incomplete type
