Heh - so many problems
Code:
gcc -W -Wall -ansi -pedantic -O2 hello.c
hello.c:3: warning: return type defaults to `int'
hello.c: In function `main':
hello.c:18: warning: ISO C forbids nested functions
hello.c:20: warning: ISO C89 forbids mixed declarations and code
hello.c:26: warning: control reaches end of non-void function
hello.c:14: warning: `loo' might be used uninitialized in this function
Start beefing up your compiler options - they can tell you quite a lot about the problems you have.
Try this
Code:
#include <stdio.h>
typedef struct p {
int data;
int voo, soo;
struct p *moo;
} koo;
void print_it(koo * some_pointer)
{
printf("the thing is %d\n", some_pointer->soo);
}
int main()
{
koo bar;
koo *loo = &bar;
loo->data = 333;
loo->voo = loo->soo = 999;
print_it(loo);
return 0;
}