Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

assignment from incompatible pointer type

Name: Anonymous 2011-08-18 5:28

C/C++ is retarded. I dont care about "types". They are all 32-bit integers anyway. Typing was invented by math imbeciles and good for nothing Ph.D parasite-jews.

Name: Anonymous 2011-08-19 17:05

>>4
#include <stddef.h>
#include <stdio.h>

ptrdiff_t get_ptrdiff(void* a, void* b)
{
        return (ptrdiff_t)b - (ptrdiff_t)a;
}


int main()
{
    int i = 300, *a = &i;
    char* b = "SPARTA";
    printf("a = 0x%p\nb = 0x%p\nb - a = 0x%x\n", a, b, get_ptrdiff(a, b));
    return 0;
}

>
>$ ./ptrdiff
>a = 0x0xbfa6ac14
>b = 0x0x8048500
>b - a = 0x485dd8ec
>

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List