a3.c and a1.cpp, available from the class web site. You should not make unnecessary changes to these files, and should link them to your other files. The #include directives in a1.cpp assume that you are using Visual C++ version 6.0, so one example of a necessary change would be modifying them if you are using another implementation.
The test files also assume that there is only a single project-dependent header file "dfa.h". You may create and use more than one header file if you wish, modifying your test file accordingly. In any case, you are responsible for constructing the appropriate header file(s) so that the test file may be compiled. This will involve inspection of the test file to determine the parameter types and the return types of the functions it calls. However the functions that build rules (the rule constructor in C++ and the make_unary_rule and make_binary_rule functions in C) should take arguments of explicit types terminal and nonterminal. You may define these types in terms of strings and characters by using typedef. The argument to the C++ function testStringAndPrint, and the 2nd argument to the C function of that name, are strings rather than nonterminals.
Note that for both languages the test program assumes that you are reclaiming storage -- by calling a destructor in C++, and by calling special "delete_grammar" and "delete_dfa" procedures in C. It's your responsibility to define these functions so that they reclaim storage properly.
The test files enable a command-line interface (by the arguments to main) in the C++ case and do not in the C case. You needn't do so in either case (unless your language implementation requires it), and you may do so in either case, and you may modity the test files accordingly. If you are using the Microsoft Visual implementation, you may make your project a console application if you want.