Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/11/2012, 10:26
alex_f
 
Fecha de Ingreso: noviembre-2012
Mensajes: 24
Antigüedad: 11 años, 5 meses
Puntos: 3
Respuesta: Error al pasar un arreglo Struc a una funcion. Lenguaje C#

Declaraste la funcion Graba_Fact pero luego no la definiste. Al invocarla se genera un error.

Una sugerencia, si usas solo un dato int en una estructura y luego creas un arreglo de esos valores tal ves te convenga usar una sola estructura.

Código C++:
Ver original
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. //========DECLARACION FUNCIONES===========//
  5. void Graba_Fact(struct datosreg* con[]);
  6.  
  7.  
  8. //==============ESTRUCTURA=================//
  9.     struct datoscli {
  10.                   int Monto;
  11.              };
  12.  
  13.     struct datosreg {
  14.                  struct datoscli datos[999];
  15.             };
  16.  
  17.  
  18.  
  19. //============COMIENZO MAIN==============//
  20.  
  21.     int main() { struct datosreg inforeg[2]; //DECLARO LA STRUC COMO LOCAL Y NO GLOBAL PORQUE ASI ME LO PIDEN EN LA FACULTAD. //===Pasando Vector a funcion====//
  22.     Graba_Fact((struct datosreg **) &inforeg);
  23.     }
  24.  
  25. //===============FIN MAIN==================//
  26.  
  27.  
  28.  
  29.  
  30. //========RESOLUCION DE FUNCION==========//
  31.  
  32. void menu(struct datosreg* con[])
  33. {
  34. //Aca por el momento no tengo nada para evitar posibles errores también.
  35. }
  36.  
  37. void Graba_Fact(struct datosreg* con[])
  38. {
  39. //Aca por el momento no tengo nada para evitar posibles errores también.
  40. }
  41.  
  42. //==============FIN FUNCION=============//

Saludos.