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

C vs. C++

Name: Anonymous 2013-06-27 19:06

$ cat >main.cc
#include <iostream>

int main() {
    int c = 0;
    int cpp = c++;
    std::cout << "c < c++: " << (c < cpp ? "true" : "false") << std::endl;
    std::cout << "c > c++: " << (c > cpp ? "true" : "false") << std::endl;
    return 0;
}
$ g++ main.cc
$ ./a.out
c < c++: false
c > c++: true
$

Name: Anonymous 2013-06-28 2:13


#include <stdio.h>

int main(void)
{
int c;
if(c > c++)
{
fputs("heck yeah", stdout);
return(0);
}
else
{
fputs("lolwut", stdout);
return(-1);
}
}

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