I have the following code that worked fine until I included several "C ++ functions" in the caption.
\begin{lstlisting}[language=C++,frame=single,caption=Contenido de la funciones booleanas g_agavacea(), g_cactacea() y g_crasulacea().,captionpos=b,label=code7]
...
\end{lstlisting}
After compiling I get the following message: ! Package xkeyval Error: `g_cactacea() y g_crasulacea().' undefined in families `lst'.
While in the PDF I only see "Cuadro 7: Contenido de la funciones booleanas g_agavacea()" in the caption.
At the beginning I thought that the error was due to the _ but I think it is not, since I tried to write the _ in different ways and the problem continues.
I hope you can help me solve this problem. Thank you.
xkeyvaltreats the comma in your caption as a key-val separator. You can wrap the caption in a pair of brace, likecaption={...,...}. – muzimuzhi Z Jan 11 '22 at 05:31