blob: d14d256d3e9722c7df722f6e62f086df35b04eeb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Commenting out code</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>
<body>
<h1>Commenting out code</h1>
<p>You can comment out one or more lines of code. The leading characters <samp>//</samp>
are added to the beginning of each line.</p>
<p><b>Tip:</b> The characters <samp>/* */</samp> on lines that already are
already commented out are not affected when you comment and uncomment code as
described above.</p>
<p>To comment out code:</p>
<ol>
<li>In the C/C++ editor, select the line(s) of code that you want to comment out.</li>
<li>Right-click and do one of the following:</li>
<ul>
<li>To comment out the selected code, select <b>Comment</b>.</li>
<li>To remove the leading <samp>//</samp> characters from the selected
line(s) of code, select <b>Uncomment</b>.</li>
</ul>
</ol>
<p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
<br>
<a href="../concepts/cdt_o_code_entry.htm">Code entry</a></p>
<p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
<br>
<a href="cdt_t_cust_cpp_editor.htm">Customizing the C/C++ editor</a><br>
<a href="cdt_o_con_assist.htm">Working with Content Assist</a></p>
<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br>
<a href="../reference/cdt_o_ceditor_pref.htm">C/C++ editor, code templates and search
preferences</a></p>
<img src="../images/ng03_04.gif" ALT="IBM Copyright Statement" BORDER=0 width="324" height="14">
</body>
</html>