re: c++, no image desc
@vaporeon_ a ternary can resolve to an lvalue in c++ so (a < b ? a : b) = 3;
is legal
re: c++, no image desc
@wallhackio Beautiful
Now I'm sad that it doesn't work in C
This compiles in C++, but not in C
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
int a = 1, b = 2;
srand(time(NULL));
((rand() % 2 == 0) ? a : b) = 3;
printf("%d %d\n", a, b);
return 0;
}
re: c++, no image desc
@vaporeon_ oh this is evil lmao
re: c++, no image desc
@wallhackio OK, what is this a reaction to?