In g++ compile it with "g++ ptvm.cpp -std=c++11 -fwhole-program -s -O3" You can also use any C++11 complient compiler.
A Simple Virtual Machine