Skip to content

Instantly share code, notes, and snippets.

@scooby
Created February 8, 2009 05:32
Show Gist options
  • Save scooby/60212 to your computer and use it in GitHub Desktop.
Save scooby/60212 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
void printy(char* t) {
unsigned long* v; // Swab on a little-endian machine
v = (unsigned long*) t;
cout << "0x" << hex << *v << "; // " << t << endl;
}
int main(void) {
printy("inta");
printy("flta");
printy("stra");
printy("syma");
printy("blna");
printy("nula");
printy("erra");
printy("funo");
printy("func");
printy("lsto");
printy("lstc");
printy("bago");
printy("bagc");
printy("dcto");
printy("dctc");
printy("Best");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment