Mar 18, 2014 at 8:52pm UTC
Thanks, that's a good explanation!
Mar 18, 2014 at 9:05pm UTC
1 2 3 4
#include <iostream>
#include <stdio.h>
#include <cstddef>
std::size_t main(){putchar(0x07);std::cin.get();main();return 1337;}
Last edited on Mar 18, 2014 at 9:06pm UTC
Mar 18, 2014 at 9:14pm UTC
You can use '\a'
instead of 0x07
Mar 18, 2014 at 9:23pm UTC
But I wanted to make it less readable. :(
Mar 19, 2014 at 2:17am UTC
@giblit
Too bad that will always result in false >:D
Am I the only one that finds it kind of funny this is legal in C++ ? (Well with VS 2012's compiler it's legal)
1 2 3 4
if (1 > 2)
{
std::cout << "Basic logic has been broken" << std::endl;
}
Well getting technical, if you left out ++, wouldn't
'j' > 'c'
return true?
Last edited on Mar 19, 2014 at 2:20am UTC
Mar 19, 2014 at 2:35am UTC
@giblit
Yeah, I was just thinking about J being better than C++, not like you can run an operation inside ' '
lol. I was bringing up 'j' > 'c'
as in if you wanted to make that a real operation.
Thanks for informing me of yet another programming language, they just seem so scarce these days!
Mar 19, 2014 at 4:19am UTC
Well, just in case you didn't catch on, I was being sarcastic ;)
Gotta laugh though, no idea C-- existed.
Last edited on Mar 19, 2014 at 4:19am UTC
Mar 19, 2014 at 1:31pm UTC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
class Normal_person
{
public :
virtual void eat() = 0;
virtual void sleep() = 0;
virtual void do_something() = 0;
};
class Programmer : public Normal_person
{
public :
void eat()
{
_eat();
code();
}
void sleep()
{
if ( midnight ) {
Sleep( FIVE_HOUR );
} else {
code();
}
}
void do_something()
{
code();
}
void code()
{
code();
}
void play()
{
code();
}
bool hasLife( ) const
{
return 0;
}
};
typedef Programmer You;
int main()
{
You suck;
while ( !suck.hasLife() ) {
eat();
sleep();
code();
}
}
I don't think this is insulting at all
Last edited on Mar 19, 2014 at 1:37pm UTC