File: hw_example.htm

package info (click to toggle)
eclipse-cdt 8.1.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 124,528 kB
  • sloc: java: 1,013,030; xml: 45,808; ansic: 5,171; cpp: 4,533; makefile: 1,323; sh: 99; asm: 42; f90: 22
file content (30 lines) | stat: -rw-r--r-- 720 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Language" content="en-us">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>C++ Hello World example</title>
</head>
<body style="background-color:#ffffcc;">
<p role="main" style="color:#0066ff">Copy the code below and paste it into the <strong>main.cpp</strong> file in the Editor view:</p>

<pre>
#include &#60iostream&#62
#include &#60string&#62
using namespace std;

int main()
{
	string yourName;

	cout &lt;&lt; "Type your name: ";
	cin  &gt;&gt; yourName;
	cout &lt;&lt; "Hello " + yourName &lt;&lt; endl;

	return 0;
}

</pre>

</body>
</html>