Errors when compiling C program with pointers
When I run this on my computer I get compile errors. However, I did copy it straight from a tutorial I found on the Internet.


    #include <stdio.h>
    #include <conio.h>

    void main(){
        int i = 9;
        clrscr();

        printf("The value of i is: %d\n", i);
        printf("The address of i is: %u\n", &i);
        printf("The value at the address of i is: %d\n", *(&i));

        getch();
    }


The errors:

cc "-Wall" -g    ptrex6.c   -o ptrex6

ptrex6.c:7:19: error: conio.h: No such file or directory

ptrex6.c:9: warning: return type of ‘main’ is not ‘int’

ptrex6.c: In function ‘main’:

ptrex6.c:11: warning: implicit declaration of function ‘clrscr’

ptrex6.c:14: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘int *’

ptrex6.c:17: warning: implicit declaration of function ‘getch’

make: *** [ptrex6] Error 1

Errors when compiling C program with pointers
===

When I run this on my computer I get compile errors. However, I did copy it straight from a tutorial I found on the Internet.


    #include <stdio.h>
    #include <conio.h>

    void main(){
        int i = 9;
        clrscr();

        printf("The value of i is: %d\n", i);
        printf("The address of i is: %u\n", &i);
        printf("The value at the address of i is: %d\n", *(&i));

        getch();
    }


The errors:

cc "-Wall" -g    ptrex6.c   -o ptrex6

ptrex6.c:7:19: error: conio.h: No such file or directory

ptrex6.c:9: warning: return type of ‘main’ is not ‘int’

ptrex6.c: In function ‘main’:

ptrex6.c:11: warning: implicit declaration of function ‘clrscr’

ptrex6.c:14: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘int *’

ptrex6.c:17: warning: implicit declaration of function ‘getch’

make: *** [ptrex6] Error 1
