blob: a7c7917c71c11b4e1bae092b678e3be20ff69148 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="../../help.css">
<title>Creating your C++ file</title>
</head>
<body>
<h1>Creating your C++ file</h1>
<p>Once you have created a new remote C/C++ project, you can begin coding your program.
The .cpp file that you create will be saved in the project folder you just created in
<a href="creating_a_remote_project.html">Creating a remote project</a>.</p>
<p>Files are edited in the <b>Remote C/C++ Editor</b> located to the right of
the <b>Project Explorer</b> view. The left margin of the <b>Remote C/C++ Editor</b>, called the marker
bar, displays icons for items such as bookmarks, breakpoints, and compiler errors and warnings.</p>
<p>For more information about:</p>
<ul>
<li>The marker bar, see <b>Workbench User Guide &gt; Reference &gt; User interface
information &gt; Icons and buttons &gt; Editor area marker bar</b></li>
<li>The editor area, see <b>Workbench User Guide &gt; Reference &gt; User interface
information &gt; Views and editors &gt; Editor area</b></li>
</ul>
<p>To create a C++ file:</p>
<ol>
<li>In the <b>Project Explorer</b> view, right-click a project, and
select <b>New &gt; File &gt; Other</b>.<br>
<img src="../../images/create_c_file_01.png"
alt="New &gt; File &gt; Other in Projects View"></li>
<li>Select <b>Source file</b> under <b>C++</b>.<br>
<img src="../../images/create_c_file_02.png"
alt="New Source file in New Wizard Dialog"></li>
<li>In the <b>Source File</b> box, type a name followed by the
appropriate extension. Select a template.</li>
<li>Click <b>Finish</b>.<br>
<img src="../../images/create_c_file_03.png" alt="New Source File Wizard"></li>
<p>The file will open in the Remote C/C++ editor.</p>
<li>Enter your code in the editor view.<br>
<img src="../../images/create_c_file_04.png"
alt="Editor view with a sample code"></li>
<li>Type <b>CTRL+S</b> to save the file.</li>
</ol>
<p>Your new .cpp file is displayed in the <b>Project Explorer</b> view. Before you
can build your newly created project, you must create a makefile.
See <a href="creating_your_makefile.html">Creating your makefile</a>.</p>
<br>
<b>Related tasks</b>
<br>
<a href="../tasks/creating_c_file.html">Creating a C/C++ file</a>
<br>
<b>Related reference</b>
<br>
<a href="../reference/remote_c_editor.html">Remote C/C++ Editor</a>
<br>
<br>
</body>
</html>