Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: b9aa13cf63467d0d3a1f4f617cdd31cb0d1bc4c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!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 <strong>Remote C/C++ Editor</strong> located to the  right of 
		the <strong>Project Explorer</strong> view. The left margin of the <strong>Remote C/C++ Editor</strong>, 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 <strong>Workbench User Guide &gt; Reference &gt; User interface 
		  information &gt; Icons and buttons &gt; Editor area marker bar</strong></li>
		  <li>The editor area, see <strong>Workbench User Guide &gt; Reference &gt; User interface 
		  information &gt; Views and editors &gt; Editor area</strong></li>
		</ul>
		
		<p>To create a C++ file:</p>
		<ol>
		  <li>In the <strong>Project Explorer</strong> view, right-click a project, and
		select <strong>New &gt; File &gt; Other</strong>.<br>
		    <img src="../images/create_c_file_01.png"
		 alt="New &gt; File &gt; Other in Projects View"></li>
		 <li>Select <strong>Source file</strong> under <strong>C++</strong>.<br>
		    <img src="../images/create_c_file_02.png"
		 alt="New Source file in New Wizard Dialog"></li>
		  <li>In the <strong>Source File</strong> box, type a name followed by the
		appropriate extension.  Select a template.</li>
		  <li>Click <strong>Finish</strong>.<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 <strong>CTRL+S</strong> to save the file.</li>
		</ol>

		<p>Your new .cpp file is displayed in the <strong>Project Explorer</strong> view. Before you 
		can build your newly created project, you must create a makefile.  
		See <a href="cdt_w_newmake.htm">Creating your makefile</a>.</p>
		
<br>
   		
   		<span class="bold">Related tasks</span>
      	<br>
      	<a href="cdt_w_newcpp.htm">Creating a C/C++ file</a>
   <br>
		
		<span class="bold">Related reference</span>
      	<br>
   <a href="../reference/cdt_u_editor_view.htm">Editor View</a><br>
		<br>
		
</body>
</html>

Back to the top