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

Pages: 1-

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-27 19:08

egwingwingwingwingwingwingwin gro

Name: Anonymous 2013-06-27 19:08

Yep, we get it. Sepples is bigger than C. Does that mean it's better? No.

Name: Anonymous 2013-06-27 19:10

>>2
You seem to miss your beloved /g/ a lot. You can always go back, you know.

Name: Anonymous 2013-06-27 19:14

Read SICP

Name: Anonymous 2013-06-27 19:16

>>2
le groski face eggwing.

Name: Anonymous 2013-06-27 19:48

Comparing C and C++ is a mistake in itself.

Name: Anonymous 2013-06-28 2:05

>>3

It says c > c++ though.

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);
}
}

Name: Anonymous 2013-06-28 2:51

>>3
someone doesn't understand incremental operator positioning =)

Name: Anonymous 2013-06-28 3:17

>>9
I hope the next time you have to climb a staircase, you find that all the steps are aligned to the same staggering depth, so that you're faced with a completely smooth wall instead.

Name: Anonymous 2013-06-28 3:22

>>10
no need for the stupid emote

Name: Anonymous 2013-06-28 3:28

>>12
sorry... ;D

Name: Anonymous 2013-06-28 3:37

>>13
★★☆☆☆, Luke.

Name: Anonymous 2013-06-28 4:40

Keep jukin the jews, Luke

Name: 3 2013-06-28 5:26

>>8,10
I'm sorry. The code was so dumb, you gotta understand.

Name: Anonymous 2013-06-28 7:05

>>16
Nice excuse, but the fact is you're a mental midget. I seriously hope you're not an employed programmer, because you should be scrubbing toilets instead.

Name: 3 2013-06-28 7:33

>>17
I disagree. You have to admit >>1's code is garbage. The result is misleading because the two variables are equal.

Name: 18 2013-06-28 7:35

Oh god I'm ashamed of this. They're not equal of course...

Name: Anonymous 2013-06-28 7:35

brb scrubbing toilets

Name: Anonymous 2013-06-28 9:54

fputs("lolwut", stdout);
Typical C-coder. Damn full retard.

Name: Anonymous 2013-06-28 14:28

>>4
"...suffer like /g/ did, lol"

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