foo.c


/*********************************************************************
Build with:

cl [-Zi] foo.c

using Zi will produce a debuggable executable.
*********************************************************************/

#include <stdio.h>

/*
    Define a new data type: pointer to int.
*/
typedef int *PINT;

int main(int argc, char *argv[]){
    PINT foo;   /* foo is now a pointer to int */
    int bar = 85;
    foo = &bar; /* foo now points at bar.  derefencing foo will yield 
                   the contents of bar */
    printf("Contents of bar %d\n", *foo);

    return 0;
}

__declspec(dllexport) void bar(void){
    return;
}