Hello all,
sorry if this question seems stupid, I've just started using C and I'm far more used to the syntax of Matlab. I'd like to have a set of functions that perform operations on struct's that contain two elements and then return a struct that also contains two elements.

Here is the code but I'm receiving multiple errors and don't really know when to start debugging even though the code is very short.

Code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>

typedef struct { int real; int imag;} int_type;

int main()
{

int_type f, g, y, a, b, c;

  f.real=4;
  f.imag=7;
  g.real=21;
  g.imag=77;

  y=int_add(f,g);

  //  printf("%d and %d", y[1], y[2]);

  getchar();
  return 0;
}

int_type int_add(a, b)
{
  struct int_type c;

  c.real = a.real + b.real;
  c.imag = a.imag + b.imag;

  return c;
}
Thanks for any help in advance.

Seb