Created
January 12, 2011 14:39
-
-
Save hiromu/776224 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstring> | |
#include <iostream> | |
#include <unistd.h> | |
#include <sys/syscall.h> | |
using namespace std; | |
#define __NR_brainfuck 223 | |
#define OUTPUT_LEN 100 | |
int main (void) | |
{ | |
int source_len, input_len; | |
string source, input; | |
char output[OUTPUT_LEN]; | |
cout << "Source :"; | |
cin >> source; | |
cout << "Input :"; | |
cin >> input; | |
syscall(__NR_brainfuck, source.c_str(), input.c_str(), output, source.size(), input.size(), OUTPUT_LEN); | |
cout << output << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment