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

whats this do

Name: Anonymous 2009-02-20 18:36

yo guys, just came across this mad piece of hardcore code, can anyone tell me what it does:

if(1) 1 ? 0 : 1;

Name: Anonymous 2009-02-21 0:42


class ternary
{
public:
 ternary(int statement_) : statement(statement_) {}
 ternary() : statement(0) {}
 int question(int a, int b)
 {
  if(statement)
   return a;
  else return b;
 }
 
 int statement;
};


int main(int argc, char* argv[])
{
 ternary test(1);
 if(1)
  test.question(1);
}

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