/* adds i/o header to use cin/cout */
#include <iostream>
/* adds reference to std. You can use std::cin, std::cout and std::endl instead */
using namespace std;
int main()
{
/* 'string' is a class! */
string name, tab = "";
int counter;
cout << "What's yor name?" << endl;
cin >> name ;
cout << "Times: ";
cin >> counter;
for (int i = 0 ; i < counter ; i++)
cout << (tab += " ") << "Hello, " << name << "!" << endl;
return 0;
}
compile (for windows): g++ HelloWorld-Cpp.cpp -o cpp.exe