C vs. C++
1
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
$
2
Name:
Anonymous
2013-06-27 19:08
egwingwingwingwingwingwingwin gro
3
Name:
Anonymous
2013-06-27 19:08
Yep, we get it. Sepples is bigger than C. Does that mean it's better? No .
4
Name:
Anonymous
2013-06-27 19:10
>>2
You seem to miss your beloved /g/ a lot. You can always go back, you know.
5
Name:
Anonymous
2013-06-27 19:14
Read SICP
6
Name:
Anonymous
2013-06-27 19:16
>>2
le groski face eggwing.
7
Name:
Anonymous
2013-06-27 19:48
Comparing C and C++ is a mistake in itself.
8
Name:
Anonymous
2013-06-28 2:05
>>3
It says c > c++ though.
9
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);
}
}
10
Name:
Anonymous
2013-06-28 2:51
>>3
someone doesn't understand incremental operator positioning =)
11
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.
12
Name:
Anonymous
2013-06-28 3:22
>>10
no need for the stupid emote
13
Name:
Anonymous
2013-06-28 3:28
14
Name:
Anonymous
2013-06-28 3:37
15
Name:
Anonymous
2013-06-28 4:40
Keep jukin the jews, Luke
16
Name:
3
2013-06-28 5:26
>>8,10
I'm sorry. The code was so dumb, you gotta understand.
17
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.
18
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.
19
Name:
18
2013-06-28 7:35
Oh god I'm ashamed of this. They're not equal of course...
20
Name:
Anonymous
2013-06-28 7:35
brb scrubbing toilets
21
Name:
Anonymous
2013-06-28 9:54
fputs("lolwut", stdout);
Typical C-coder. Damn full retard.
22
Name:
Anonymous
2013-06-28 14:28
>>4
"...suffer like /g/ did, lol"