[Tex/LaTex] \fillin command from exam class not working: Undefined control sequence

exam

I'm trying to create my first exam using documentclass{exam}, and saw in their documentation (http://mirrors.ctan.org/macros/latex/contrib/exam/examdoc.pdf , page 44) that there is a \fillin command, which will create a blank line that a paper-pencil test taker could fill in, and optionally the test creator can enter the answer, and decide whether or not to have the answer appear when printing.

When I compile with the \fillin command I get the common "Undefined control sequence" error.

I compile with xelatex, but tried on ShareLaTex as well and received the same error. Is there something I'm missing? An option or package I need to include? Any help is much appreciated, here's a minimal working example:

\documentclass[addpoints,answers]{exam}

\begin{document}

\section{Introduction}

\begin{questions}

    \question How many fingers am I holding up? \fillin

    \question[1] Did you know the average human head weighs \fillin[8] pounds?

\end{questions}

\end{document}

Best Answer

Since 2012/08/20, Version 2.401β of exam has

\fillin[<CorrectAnswer>]{<width>}

As of today, ShareLaTeX is only running TeX Live 2014 with exam at version 2011/05/22 Version 2.4, and is therefore short on the above command.

Easiest would be do download exam.cls and upload it as part of your project.

enter image description here

enter image description here

\documentclass[addpoints,answers]{exam}

\begin{document}

\section{Introduction}

\begin{questions}

\question How many fingers am I holding up? \fillin

\question[1] Did you know the average human head weighs \fillin[8] pounds?

\end{questions}

\end{document}