[Tex/LaTex] Subfig package: Undefined control sequence \includegraphics

subfloats

I want to use subfig to put multiple pictures under one caption. However, the error mentioned in the title occurs.

\documentclass[conference]{IEEEtran}
\usepackage{cite}
%\usepackage{caption}
%\usepackage[font=footnotesize]{subfig}
\usepackage{subfig}
\usepackage{url}
\usepackage{amssymb}
\usepackage{amsmath}

\newcommand{\sH}{{\sf H}}
\newcommand{\veceps}{{\boldsymbol{\varepsilon}}}
\newcommand{\isdef}{\stackrel{\rm def}{=}}

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}

\begin{document}

\title{title}

\author{\IEEEauthorblockN{Peter Pan}
\IEEEauthorblockA{Peter Pan Holding\\
who knows\\
Email: pp@pan.com}
\and
}

\maketitle

\begin{abstract}
%\boldmath
bla.
\end{abstract}

\IEEEpeerreviewmaketitle

\begin{figure}[!ht]
    \subfloat[First sub-figure\label{subfig-1:dummy}]{%
      \includegraphics[width=0.45\textwidth]{gfx/tau_enrollment-aging1-SRAM}
    }
    \hfill
    \subfloat[First sub-figure\label{subfig-2:dummy}]{%
      \includegraphics[width=0.45\textwidth]{gfx/tau_enrollment-aging1-SRAM}
    }
    \caption{Dummy figure}
    \label{fig:dummy}
\end{figure}}


\bibliographystyle{IEEEtran}

\bibliography{references}

\end{document}

Best Answer

Add \usepackage{graphicx} to your preamble. You also have a stray } after your \end{figure}. Fix those two things and you'll be on your way!