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

QUESTIONARIO

Name: Anonymous 2010-11-06 21:38

question /anus/,
If i pass a variable via it's pointer rather than value am i then not creating any more memory into the program?


#define ANUS     1
int main(){
    char i = ANUS;    //8 bits
    applebees(i);    //2 chars; 16bits
        //vs:
    tgifridays(&i); //1 char;  8 bits
    return 0;
}

void applebees(int i){
    return;
}
void tgifridays(int *i){
    return;
}

Name: Anonymous 2010-11-07 1:57

tgifridats: push a memory address onto the stack.
applebeses: push value onto stack.

doing this without const& is retarded.

learn to asm

Name: Anonymous 2010-11-07 1:09

Maybe you should fuck off.

Name: Anonymous 2010-11-07 1:13

>>1
&i is not 8bits

Name: Anonymous 2010-11-07 5:44

What about it is pointer value?

Name: Anonymous 2010-11-07 5:45

And passing a char * to a function expecting an int * might actually sometimes work, when passing variables on the stack, but in most cases you'll overwrite some other data. The value stored through the int * might or might not be what's read from the char later, depending on the byte order.

sizeof (int*) == sizeof (char*)

And could someone tell me if I have bitch tits? I can't see past my chin.

Name: Anonymous 2010-11-07 8:02

Meet your new best friend: -fno-strict-aliasing

Name: Anonymous 2010-12-27 5:36

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