Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/12/2014, 12:49
eferion
 
Fecha de Ingreso: octubre-2014
Ubicación: Madrid
Mensajes: 1.212
Antigüedad: 9 años, 6 meses
Puntos: 204
Respuesta: arreglos en c

sustituye int por malloc:

Código C:
Ver original
  1. struct CAlumnosSeleccion
  2. {
  3. //...
  4. };
  5.  
  6. int Programacion1[],Programacion2[];
  7. char VMatricula;
  8. //Funciones
  9. struct CAlumnosSeleccion reservarMemoria( int CantidadAlumnos)
  10. {
  11.   struct CAlumnosSeleccion to_return;
  12.   if(CantidadAlumnos>0)
  13.     to_return.Programacion1 = (int*)malloc( CantidadAlumnos * sizeof( struct CAlumnosSeleccion) );
  14.   else
  15.     to_return.Programacion1 = 0;
  16.   return to_return;
  17. }