Skip to main content
summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAndrew Gvozdev2014-04-29 11:02:32 -0400
committerAndrew Gvozdev2014-04-29 11:37:16 -0400
commitf5f4b5101a63eca6857d139f2653cf3d1e71a4ca (patch)
tree8d5107976b4091211822567c2c96afcc326b51c5 /doc
parent8047915f17c48e666efe13aca1afce7fc631bcbf (diff)
downloadorg.eclipse.cdt-f5f4b5101a63eca6857d139f2653cf3d1e71a4ca.tar.gz
org.eclipse.cdt-f5f4b5101a63eca6857d139f2653cf3d1e71a4ca.tar.xz
org.eclipse.cdt-f5f4b5101a63eca6857d139f2653cf3d1e71a4ca.zip
bug 433472: Sample code is untidy
Diffstat (limited to 'doc')
-rw-r--r--doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm2
-rw-r--r--doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm14
2 files changed, 9 insertions, 7 deletions
diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm
index 998b070f84..4697ba5368 100644
--- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm
+++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm
@@ -104,7 +104,7 @@ examining the contents of variables.</p>
<br>
</li>
<li>Click <strong>Run &gt; Resume</strong>.
- <p>The output in the <span class="typewriter">helloworld.exe</span> application window is: &nbsp;&quot;<span class="typewriter">You just entered m, you need to enter m to exit.</span>&quot;
+ <p>The output in the <span class="typewriter">helloworld.exe</span> application window is: &nbsp;&quot;<span class="typewriter">Thank you. Exiting.</span>&quot;
</p></li>
<li>The application terminates and the debug session ends. The <strong>Debug</strong> perspective remains open.</li>
</ol>
diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm
index 0f98070166..3acbf56175 100644
--- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm
+++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm
@@ -46,17 +46,19 @@ bar, displays icons for items such as bookmarks, breakpoints, and compiler erro
using namespace std;
int main () {
- // Say Hello five times
+ // Say HelloWorld five times
for (int index = 0; index &lt; 5; ++index)
- cout &lt;&lt; <q>HelloWorld!</q> &lt;&lt; endl;
+ cout &lt;&lt; &quot;HelloWorld!&quot; &lt;&lt; endl;
char input = 'i';
- cout &lt;&lt; <q>To exit, press 'm'</q> &lt;&lt; endl;
+ cout &lt;&lt; &quot;To exit, press 'm' then the 'Enter' key.&quot; &lt;&lt; endl;
+ cin >> input;
while(input != 'm') {
+ cout &lt;&lt; &quot;You just entered '&quot; &lt;&lt; input &lt;&lt; &quot;'. &quot;
+ &lt;&lt; &quot;You need to enter 'm' to exit.&quot; &lt;&lt; endl;
cin >> input;
- cout &lt;&lt; <q>You just entered </q> &lt;&lt; input
- &lt;&lt; <q> you need to enter m to exit.</q> &lt;&lt; endl;
}
- exit(0);
+ cout << "Thank you. Exiting." << endl;
+ return 0;
}
</pre>
</li>

Back to the top