For C++ you'd need to use a file extension suitable for C++, i.e. *.cpp or *.cc.How do I fit this square peg into the C++ hole?
In addition, i'd use the C++ headers, e.g. <stdlib.h> becomes <cstdlib>, <stdio.h> becomes <cstdio> and so on.
What's the exact error message?Why don't this compile.