subfigure correct labeling

I use the label command to get a) and b) next to my pictures. AucTeX claims these are all duplicate global labels. I guess I misunderstood the subfigure.

\subfigure[][]{%
\label{a}
}%
% later in the document
\subfigure[][]{%
\label{a}
}%


Was it a mistake to annotate with label?

Please do not answer with alternatives for subfigure. When I start my next document I will try something different, but I have to fix it this time.

-
You mean that for each figure with a subfigure you always start with \label{a} then \label{b} and so on? –  hpesoj626 Dec 16 '12 at 21:35

\label does not produce a visible label it is the internal key (identifier) a symbolic name for the figure so that you can cross reference it from elsewhere in the document with ref{a} . \ref will generate the actual figure number as used by the figure labeled a. Clearly this only works if there is only one such figure.