New Paste :: Recent Pastes:: No Line Numbers
ererhm by Merlin
1
// bitsnbytes.cpp : Defines the entry point for the console application. // #include "stdafx.h" #define w(x,y,z) ((unsigned long)((unsigned char)(x) | ((unsigned char)(y) << 8) | ((unsigned char)(z) << 16))) #define x(rgb) ((unsigned char((rgb) >> 16)) #define y(rgb) ((unsigned char)(((unsigned short)(rgb)) >> 8)) #define z(rgb) ((unsigned char)(rgb)) #define s(a,b,c) printf("red: %i\nblue: %i\ngreen: %i\n", a,b,c); #define m(j,k) int _tmain(int j, _TCHAR* k[]) m(argc, argv) { int n=w(0, 118, 163); int r,g,b; r=x(n);g=y(n);b=z(n); s(r,g,b); return 0; } d:\projects\bitsnbytes\bitsnbytes.cpp(17) : error C2143: syntax error : missing ', ')' before ';'