Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

\prog\ challenge

Name: Anonymous 2020-09-09 19:33

Just post any fucking code, can be fibs or even hello world

Name: Anonymous 2020-09-10 9:24

>>8
A type-safe zero-overhead Enum Class.
#define atype __auto_type
#define enumc(name,...) typedef union{}name;name __VA_ARGS__;
#define istype(x,type) (_Generic((x),type:1,default:0))

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
int main(int argc,char**argv){
enumc(Colors,Red,Blue,Yellow,Green);
Colors Purple=Red;
atype Black=Blue;
#define isblue(x) (&Blue==&x)
#define isgreen(x) (&Green==&x)
#define ispurple(x) (&Purple==&x)
printf("%d:%d,%d:%d \n%d:%d,%d:%d,",istype(Purple,Colors),istype(Black,int),isblue(Blue),isblue(Red),
isblue(Black),ispurple(Purple),isblue(Yellow),isgreen(Green));

}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List