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

is this bad?

Name: Anonymous 2013-08-27 12:46


struct something floattosomething(float f){
       struct something * ret = (struct something*)malloc(sizeof(struct something));
       ret->type = 3;
       ret->f = f;
       return *ret;
}

Name: Anonymous 2013-08-27 14:28

>>5
but then why does

struct something floattosomething(float f){
       struct something ret;
       ret.type = 3;
       ret.f = f;
       return ret;
}

work?

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