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

eval() in C

Name: Anonymous 2008-03-20 0:37

How would I write an eval() function in C? Where do I start?

Name: Anonymous 2008-03-20 1:17

int eval(const char *code)
{
    FILE *cc = popen("cc -o /tmp/eval.out -xc -", "w");
    fputs(code, cc);
    return pclose(cc) ? -1 : system("/tmp/eval.out");
}


YOU'RE WELCOME

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