Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Copyright (c) 2012 by Bash Vi
- // This code is released under the terms
- // of the WTFPL (What the Fuck Pulic License) version 2.0
- // http://sam.zoy.org/wtfpl/
- // Converts first character from arguments
- // into a string of 1es and 0es
- // ( ASCII value of the character)
- #include <bitset>
- #include <string.h>
- #include <iostream>
- #include <cstring>
- using namespace std;
- int main(int ac, char* av[])
- {
- bitset<8> bs;
- memcpy(&bs, av[1], 1);
- cout << bs << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement