html
css
xml
python
mysql
linux
xcode
ruby-on-rails
eclipse
silverlight
json
perl
facebook
oracle
mvc
asp
jsp
postgresql
dom
The program provided is in C, however, you're compiling with a C++ compiler.
Compile again using C, and you should be ok.
The code is being treated as C++ because the file extension is .cpp. Change it to .c and it should work. This is much easier (and less likely to cause problems) then starting to modify the source code to make it C++ compatible.
Edit: I assumed the compiler being used was gcc or cl, which do detect the language based on the file extension. Since that is not the case, you'll have to tell us what compiler (and options) you are using.
gcc
cl
Edit 2: In order to get it to work with a C++ compiler, you'll have to rename new to new1 like @whitelionV suggested and cast all the calloc() return values to the appropriate types like this:
new
new1
calloc()
44 Tape *new1 = (Tape*)calloc(1,sizeof(Tape));; 68 Tape *t = (Tape *)calloc(1,sizeof(Tape)); 80 Transition *t = (Transition *)calloc(1,sizeof(Transition)); 93 List *t = (List *)calloc(1,sizeof(List)); 105 List *t = (List *)calloc(1,sizeof(List)); 166 TM *m = (TM *)calloc(1,sizeof(TM)); 167 List *tr = (List *)calloc(1,sizeof(List));
new is a reserved word in C++, change the variable name to something like new1. Or change the .cpp to c on your file name.