Here's a conversation I spotted on another (clearly far less competent) C++ forum.
First Guy:
// operating with variables
#include <iostream>
using namespace std;
int main ()
{
// declaring variables:
int a, b;
int result;
// process:
a = 5;
b = 2;
a = a + 1;
result = a - b;
// print out the result:
cout << result;
// terminate the program:
return 0;
}
There you learned c++.
Second Guy:
I lol'd when I saw this maybe give something a little more difficult then a level 1 program to think your a hot shot. Btw your coding method is horrible let me make it prettier for you .
#include <iostream>
using namespace std;
void main ()
{
int a = 6; // Variable 'a' is declared and equal to 6
int b = 2; // Variable 'b' is declared and equal to 2
int result; // Variable "result" is declared
result = a - b; // Process
cout << result; // Output the result. Should be 4
system ( " pause " ); // Pauses the program when it finishes
}
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
I like the fact that the guy thinks he's great because he initialised his variables straight away and commented EVERY line of code.
Also, I never spotted the 'void main' , but that's because I didn't think anyone was stupid enough to do that
also, you're haven't even made a dent into C, never mind C++ with that code, I bet they would probably wet themselves if they saw a typical SDL application!
*the pointers would fry their brains and the references would make them cry*
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
--------------------------------------------------------------------------------------- And now a joke to lighten to mood :D
I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
But that's just it.. it IS funny. Or at least it was.. now it has just been turned into a debate like everything else recently. Why can't people just say "Ha." or leave it alone? (Rhetorical question.. not asking for further debate).
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!