Glitch
-
I like this: #define TRUE (rand() > 0.1 ? TRUE : FALSE) // happy debugging losers :) :laugh:
-
I like this: #define TRUE (rand() > 0.1 ? TRUE : FALSE) // happy debugging losers :) :laugh:
lol. By the way, you look like Adam Levine[^] of Maroon 5.
Ignorance of the ability brings disability.
-
I like this: #define TRUE (rand() > 0.1 ? TRUE : FALSE) // happy debugging losers :) :laugh:
P1l19r1m wrote:
#define TRUE (rand() > 0.1 ? TRUE : FALSE) // happy debugging losers :)
Shouldn't that just be #define TRUE (rand() > 0.1) ? I guess I haven't used c++ in a while, but what happens when you use a circular define like that?
-
I like this: #define TRUE (rand() > 0.1 ? TRUE : FALSE) // happy debugging losers :) :laugh:
:omg: can we do that ?? i will put this in my mate's code ;P
-
I like this: #define TRUE (rand() > 0.1 ? TRUE : FALSE) // happy debugging losers :) :laugh:
that's pure evil :) hopefully, there is no switch statement using this constant...
-
lol. By the way, you look like Adam Levine[^] of Maroon 5.
Ignorance of the ability brings disability.
Thanks. Hope it was a compliment;)
-
:omg: can we do that ?? i will put this in my mate's code ;P
You should do it!!! :-D
-
I like this: #define TRUE (rand() > 0.1 ? TRUE : FALSE) // happy debugging losers :) :laugh:
I've made some kind of mistake :(. "Copypasting" is evil :). As MSDN ( http://msdn.microsoft.com/en-us/library/398ax69y.aspx ) claims, rand() function returns a pseudorandom integer in the range 0 to RAND_MAX (32767). So, the preferable way is to use the following "working code": #define REALLYTRUE 1 #define REALLYFALSE 0 #define TRUE (rand() > (32762/2) ? REALLYTRUE : REALLYFALSE) // happy debugging losers P.S. If to compile this code: #define TRUE (rand() > 0.1 ? TRUE : FALSE) // happy debugging losers we will have an error like: c:\temp\win32\randex\randex.cpp(19) : error C2065: 'TRUE' : undeclared identifier But using the new version of code it will be "all right" :laugh:
-
Thanks. Hope it was a compliment;)
Of course it is. :)
Ignorance of the ability brings disability.
-
I've made some kind of mistake :(. "Copypasting" is evil :). As MSDN ( http://msdn.microsoft.com/en-us/library/398ax69y.aspx ) claims, rand() function returns a pseudorandom integer in the range 0 to RAND_MAX (32767). So, the preferable way is to use the following "working code": #define REALLYTRUE 1 #define REALLYFALSE 0 #define TRUE (rand() > (32762/2) ? REALLYTRUE : REALLYFALSE) // happy debugging losers P.S. If to compile this code: #define TRUE (rand() > 0.1 ? TRUE : FALSE) // happy debugging losers we will have an error like: c:\temp\win32\randex\randex.cpp(19) : error C2065: 'TRUE' : undeclared identifier But using the new version of code it will be "all right" :laugh:
Actually I liked the original version better as it will work in 32766 out of 32767 cases. Now try to reproduce that odd error! ;P
-
Of course it is. :)
Ignorance of the ability brings disability.
:)