help with understanding some commands

Okay so I'm new at trying to learn programming and I have a few questions. I'm using the accelerated c++ book and I kind of don't understand what some of the stuff means.

1
2
3
4
 const std::string greeting = "Hello, " + name + "!";
 const std::string spaces(greeting.size(), '  ');
 const std::string second = "*  " + spaces + "  *";


What exactly is const?
For the greeting = part is it like x= _____ so the greeting.size would be what the greeting is?
I don't understand the plus signs and the stars. I know the star is to make the borders but how does it know how much it needs?
0. constants cannot be modified once they've been initialized.
1. Make a constant string named 'greeting' containing the string "Hello, ", followed by a name, followed by an exclamation mark.
2. Make a constant string named 'spaces' consisting of as many spaces as characters there are in the greeting string.
3. Make a constant string named 'second' containing the string "* " followed by the string spaces, followed by the string " *".
Topic archived. No new replies allowed.