a) there is no need to write a pair style lj/class2/coul/cut, since there is one already contained in LAMMPS as part of the CLASS2 package
b) the pair style sources you were attaching are incorrect. you will easily see the mistakes when comparing your file with the sources included in LAMMPS.
c) when LAMMPS complains about an unknown XXX style, then this usually means that either you have misspelled it, or that your executable has been compiled without it.
d) if you add source code to LAMMPS or enable additional LAMMPS packages, you need to recompile and make certain, that you use the new executable, and not the old one.
e) you must be using a rather old LAMMPS version, in the same situation you would get a different message with a current version of LAMMPS, which would be more instructive:
ERROR: Unrecognized pair style ‘lj/class2/coul/cut’ is part of the CLASS2 package which is not enabled in this LAMMPS binary. (src/force.cpp:285)
Last command: pair_style lj/class2/coul/cut 9.5