Login Register






[NEED HELP] Text to binary code converter [Simple] filter_list
Author
Message
[NEED HELP] Text to binary code converter [Simple] #1
Code:
#include <string> #include <bitset> #include <iostream> #include <cstdlib> #include <string> #include <Windows.h> using namespace std; int main() { string convert; cout << "What to convert?: "; cin >> convert; string myString = convert; for (std::size_t i = 0; i < myString.size(); ++i) { cout << bitset<8>(myString.c_str()[i]) << endl; } Sleep(10000); }
And i may have included non-required stuff because i was working on an system that auto copy pastes the binary code to clipboard but i could not get it working (would appreciate if someone would help me with that)

Reply





Messages In This Thread
[NEED HELP] Text to binary code converter [Simple] - by Nazism - 03-22-2013, 09:56 PM