2011-03-31 13:59:18 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2003-11-28 21:50:02 +00:00
< html lang = "en" >
< head >
2005-07-22 22:53:05 +00:00
< 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" >
2004-04-28 17:02:19 +00:00
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;
}
2005-07-22 22:53:05 +00:00
< / script >
2003-11-28 21:50:02 +00:00
< / head >
< body >
2012-09-19 17:16:24 -04:00
< div role = "main" > < h1 > Creating a C/C++ file< / h1 >
2005-07-22 22:53:05 +00:00
< p > Files are edited in the C/C++ editor that is, by default, located in
2010-05-13 02:21:52 +00:00
the editor area to the right of the < a href = "../reference/cdt_u_project_explorer_view.htm" > Project Explorer< / a > or < a href = "../reference/cdt_u_cproj_view.htm" > C/C++ Projects< / a > views.< / p >
2005-07-22 22:53:05 +00:00
< p > The marker bar on the left margin of the C/C++ editor, displays
icons for errors, warnings, bookmarks, breakpoints and tasks.< / p >
2010-03-31 01:34:27 +00:00
< p > For more information on the marker bar, see < strong > Workbench User Guide
2005-07-22 22:53:05 +00:00
> Reference > User interface information > Views and editors
2010-03-31 01:34:27 +00:00
> Editor area< / strong > .< / p >
2011-03-31 13:59:18 +00:00
< h2 > To create a C++ file:< / h2 >
2003-11-28 21:50:02 +00:00
< ol >
2010-05-13 02:21:52 +00:00
< li > In the < strong > Project Explorer< / strong > or < strong > C++ Projects< / strong > view, right-click a project, and
2010-03-31 01:34:27 +00:00
select < strong > New > File< / strong > .< br >
2005-07-22 22:53:05 +00:00
< img src = "../images/project_new_file.png"
alt="New > File in Projects View">< / li >
< li > In the list of projects, verify that the correct project is
selected.< / li >
2010-03-31 01:34:27 +00:00
< li > In the < strong > File name< / strong > box, type a name followed by the
2005-07-22 22:53:05 +00:00
appropriate extension.< / li >
2010-03-31 01:34:27 +00:00
< li > Click < strong > Finish< / strong > .< br >
2011-03-31 13:59:18 +00:00
< img src = "../images/project_new_file_name.png" alt = "New File Wizard" > < br > < br >
< p > The file will open in the C/C++ editor.< / p > < / li >
2010-05-13 02:21:52 +00:00
< li > Enter your code in the editor view.< br >
< img src = "../images/project_new_cppfile.png" alt = "Editor view with a sample code" > < / li >
2010-03-31 01:34:27 +00:00
< li > Type < strong > CTRL+S< / strong > to save the file.< / li >
2003-11-28 21:50:02 +00:00
< / ol >
2011-03-31 13:59:18 +00:00
< p > < img src = "../images/ngconcepts.gif" alt = "Related concepts"
2005-07-22 22:53:05 +00:00
width="143" height="21">
2003-11-28 21:50:02 +00:00
< 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 >
2011-03-31 13:59:18 +00:00
< p > < img src = "../images/ngtasks.gif" alt = "Related tasks"
2005-07-22 22:53:05 +00:00
width="143" height="21">
2003-11-28 21:50:02 +00:00
< br >
2005-07-22 22:53:05 +00:00
< 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 >
2011-03-31 13:59:18 +00:00
< p > < img src = "../images/ngref.gif" alt = "Related reference"
2005-07-22 22:53:05 +00:00
width="143" height="21">
2003-11-28 21:50:02 +00:00
< br >
< a href = "../reference/cdt_o_proj_prop_pages.htm" > Project properties< / a > < / p >
2010-05-13 14:26:15 +00:00
< hr >
2003-11-28 21:50:02 +00:00
< p >
2005-07-22 22:53:05 +00:00
< img src = "../images/ng00_04a.gif" alt = "IBM Copyright Statement" > < / p >
2012-09-19 17:16:24 -04:00
< / div > < / body >
2005-07-22 22:53:05 +00:00
< / html >