Hi everyone, I'm trying to teach myself c++, and am currently using the book Accelerated C++ by Andrew Koenig and Barbara E. Moo. This is one of the programs in the book, but I can't seem to make it write out the greeting. Please help.
//Alle mulige ting til programmet
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
//Her kan der, hvis det er nødvændigt defineres nogle globale variabler
int main()
{
cout << "Please enter your first name: ";
string name;
cin >> name;
const string greeting = "Hello, " + name + "!";
const int pad = 1;
const int rows = (pad*2) + 3;
const string::size_type cols=greeting.size()+(pad*2)+2;