un ejemplo echo a lo rapido para pasar por referencia una estructura
Código C:
Ver original#include <stdio.h>
#include <string.h>
struct Estructura
{
char nombre[10];
char tel[10];
};
void funcion(struct Estructura *estructura);
int main(int argc, char **argv)
{
struct Estructura estructura;
strcpy(estructura.
nombre, "nombre"); strcpy(estructura.
tel, "tel");
funcion(&estructura);
}
void funcion(struct Estructura *estructura)
{
printf("nombre:%s - tel: %s\n", estructura
->nombre
, estructura
->tel
);
}