<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">It seems I can not use verbatim environment in beamer presentations.<br>
Is it true? I always get errors.<br></blockquote><div><br></div><div>Use the &quot;fragile&quot; option for slides that contain verbatims:</div><div><br></div><div>\begin{frame}[fragile]</div><div>\frametitle{This slides contains verbatim text}</div>
<div>\begin{verbatim}</div><div>_iNum = 0;</div><div>\end{verbatim}</div><div>\end{frame}</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On the other hand, how do you guys show source code (c, c++, bash,<br>
etc)  with beamer? Is there any suggestion to try?<br></blockquote><div><br></div><div>My personal preference is the listings package, but there are lots of other alternatives. Don&#39;t forget you&#39;ll need the &quot;fragile&quot; option too if a slide contains the lstlisting environment (from the listings package).</div>
<div><br></div><div><br></div><div>Best regards,</div><div>- Lian Tze - </div></div>