I am trying to write a simple hello program with a box of astericks around the output but I can't get the astericks to show up.
This is what I have so far.
Code:
#include <iostream>
#include <string>
using namespace std;
int main() {
cout << "Please enter your name." << endl;
string name;
cin >> name;
string k = name;
k.assign(0, '*');
string aster = "*";
aster.assign(16, '*');
cout << aster + k << endl;
string reply = "* Hello, " + name + "!" + " *";
cout << reply << endl;
cout << aster + k << endl;
return 0;
}
Code tags added by kermi3