# How do I use lstinputlisting with two different languages? [closed]

I've been using a MATLAB style (mcode.sty) which can be found here http://files.myopera.com/locksley90/blog/mcode.sty to show my MATLAB code.

It's included as `\usepackage[bw]{mcode}` and called with \lstinputlisting{matlabcode.m}. I'm now trying to include a .C file that I wish to format with C syntax, using the `{listings}` package, calling my C code with `\lstinputlisting[breaklines=true][language=C]{ccode.c}`.

This is causing a conflict between the two lstinputlistings I think - it seems to be formatting it all as MATLAB code. Any ideas how I can change the calling commands to make it work?

-
There should be only one optional argument: `\lstinputlisting[breaklines=true,language=C]{ccode.c}` – egreg Mar 4 '12 at 16:01
`\lstinputlisting[breaklines=true,language=C]{ccode.c}` should do it. If not, we probably need a minimal working example (MWE) that illustrates your problem. – Daniel Mar 4 '12 at 16:02
Thank you both, this has worked. – Andy Mar 4 '12 at 16:42

## closed as too localized by Thorsten, Alan Munn, egreg, Marco Daniel, lockstepMar 4 '12 at 17:09

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.