1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
cdt/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_cpp.htm

65 lines
No EOL
3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Creating a C/C++ file</title>
<link rel="stylesheet" type="text/css" href="../help.css">
<script language="JavaScript">
function changeSize(theImage,wd,ht) {
wdth=parseInt(theImage.style.width); hght=parseInt(theImage.style.height);
if ( !(wdth==(wd*2)) ) {wdth=wd*2; hght=ht*2;}
else {wdth=wd;hght=ht;}
theImage.style.width=wdth; theImage.style.height=hght;
}
</script>
</head>
<body>
<h1>Creating a C/C++ file</h1>
<p>Files are edited in the C/C++ editor that is by default, located in the
editor area to the right of the C/C++ Projects view.</p>
<p>The marker bar on the left margin of the C/C++ editor, displays icons for
errors, warnings, bookmarks, breakpoints and tasks.</p>
<p>For more information on the marker bar, see <b>Workbench User Guide &gt; Reference &gt; User interface
information &gt; Views and editors &gt; Editor area</b>.</p>
<p>To create a C++ file:</p>
<ol>
<li>In the <b>C++ Projects</b> view, right-click a project,
and select <b>New &gt; File</b>.<br>
<img src="../images/project_new_file.png" width="210" height="140" onClick="changeSize(this,210,140);"
alt="Screen Capture of a task menu highlighting New > File in Projects View" title="click to toggle image size"></li>
<li>In the list of projects, verify that the correct project is selected.</li>
<li>In the <b>File name</b> box, type a name followed by the appropriate extension.</li>
<li>Click <b>Finish</b>.<br>
<img src="../images/project_new_file_name.png" width="219" height="287" onClick="changeSize(this,219,287);"
alt="Screen Capture of a task menu highlighting New > File in Projects View" title="click to toggle image size"></li>
<p>The file will open in the C/C++ editor.</p>
<li>Enter your code in the editor view..<br>
<img src="../images/project_new_cppfile.png" width="241" height="179" onClick="changeSize(this,241,179);"
alt="Screen Capture of the Editor view with a sample makefile" title="click to toggle image size"></li>
<li>Type <b>CTRL+S</b> to save the file.</li>
</ol>
<p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
<br>
<a href="../concepts/cdt_c_projects.htm">CDT Projects</a><br>
<a href="../concepts/cdt_c_proj_file_views.htm">Project file views</a>
</p>
<p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
<br>
<a href="cdt_t_show_proj_files.htm">Displaying C/C++ file components in the
C/C++ Projects view</a><br>
<a href="cdt_t_prvw_hide_files.htm">Hiding files by type in the C/C++ Projects
view</a></p>
<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br>
<a href="../reference/cdt_o_proj_prop_pages.htm">Project properties</a></p>
<p>
<img src="../images/ng03_04.gif" ALT="IBM Copyright Statement" BORDER=0 width="324" height="14"></body></html>