Guest User

Untitled

a guest
Jun 19th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. string codeblock1="cout<<This is a test;";
  2. string codeblock2="int array[5]={0,6,6,3,5};}";
  3. int i;
  4. cin>>i;
  5. if(i)
  6. {
  7. execute(codeblock1);
  8. }
  9. else
  10. {
  11. execute(codeblock2);
  12. }
  13.  
  14. char code[] = { 0x2f, 0x3c, 0x17, 0x43 }; // some machine code of some sort
  15. typedef void (FuncType*)(); // define a function pointer type
  16. FuncType func = (FuncType)code; // take the address of the code
  17. func(); // and jump to it!
Add Comment
Please, Sign In to add comment