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

31 lines
No EOL
731 B
HTML

<!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;">
<div role="main">
<pstyle="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>
</div></body>
</html>