mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
bug 433472: Sample code is untidy
This commit is contained in:
parent
8047915f17
commit
f5f4b5101a
2 changed files with 9 additions and 7 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue