Copy the code below and paste it into the main.cpp file in the Editor view:

#include <iostream>
#include <string>
using namespace std;

int main()
{
    string yourName;

    cout << "Type your name: ";
    cin  >> yourName;
    cout << "Hello " + yourName << endl;

    return 0;
}

Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation