Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/12/2014, 22:19
Avatar de kspr
kspr
 
Fecha de Ingreso: agosto-2011
Ubicación: Ecuador
Mensajes: 43
Antigüedad: 12 años, 8 meses
Puntos: 7
Respuesta: Prototipo de estructura en C¿Se Puede?

Que tal asi?

Código C:
Ver original
  1. #include <stdio.h>
  2.  
  3. typedef struct
  4. {
  5.   int a;
  6.   char * fdw;
  7. } Testing;
  8.  
  9. Testing test();
  10.  
  11. int main()
  12. {
  13.  
  14.     printf("%d y %s\n", test().a, test().fdw);
  15.  
  16.     return 0;
  17. }
  18.  
  19. Testing test()
  20. {
  21.   Testing test;
  22.  
  23.   test.a = 1;
  24.   test.fdw = "foros del web";
  25.  
  26.   return test;
  27. }

no se me ocurre otra forma :P

EDIT: no habia entendido lo que querias, no se si sea posible, pero si hay alguna forma de emular seria interesante

Última edición por kspr; 02/12/2014 a las 22:33