diff options
author | Andrew Gvozdev | 2014-04-29 15:02:32 +0000 |
---|---|---|
committer | Andrew Gvozdev | 2014-04-29 15:37:16 +0000 |
commit | f5f4b5101a63eca6857d139f2653cf3d1e71a4ca (patch) | |
tree | 8d5107976b4091211822567c2c96afcc326b51c5 /doc | |
parent | 8047915f17c48e666efe13aca1afce7fc631bcbf (diff) | |
download | org.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.htm | 2 | ||||
-rw-r--r-- | doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm | 14 |
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 998b070f848..4697ba53684 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 > Resume</strong>. - <p>The output in the <span class="typewriter">helloworld.exe</span> application window is: "<span class="typewriter">You just entered m, you need to enter m to exit.</span>" + <p>The output in the <span class="typewriter">helloworld.exe</span> application window is: "<span class="typewriter">Thank you. Exiting.</span>" </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 0f980701660..3acbf561753 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 < 5; ++index) - cout << <q>HelloWorld!</q> << endl; + cout << "HelloWorld!" << endl; char input = 'i'; - cout << <q>To exit, press 'm'</q> << endl; + cout << "To exit, press 'm' then the 'Enter' key." << endl; + cin >> input; while(input != 'm') { + cout << "You just entered '" << input << "'. " + << "You need to enter 'm' to exit." << endl; cin >> input; - cout << <q>You just entered </q> << input - << <q> you need to enter m to exit.</q> << endl; } - exit(0); + cout << "Thank you. Exiting." << endl; + return 0; } </pre> </li> |