Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- int main(int argc, char* argv[]) {
- cout << "\n";
- if (argc != 2) {
- cout << "Bad parameter\n";
- return 1;
- }
- int size = strlen(argv[argc-1]);
- cout << "char(";
- for (int i = 0; i < size; i++) {
- cout << static_cast<int>(argv[argc-1][i]);
- if (i != (size-1))
- cout << ",";
- }
- cout << ")";
- cout << "\n\n";
- return 0;
- }
Add Comment
Please, Sign In to add comment