1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00
cdt/doc/org.eclipse.cdt.doc.user/getting_started/hw_example.htm
2007-06-19 19:34:42 +00:00

30 lines
No EOL
647 B
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<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 bgcolor="#ffffcc">
<font color="#0066ff">Copy the code below and paste it into the <b>main.cpp</b> file in the Editor view:</font>
<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>