As a complete beginner, I have just started working through "Jumping into C++". I am at the section on appending strings. The tutorial mentions the getline function but I can not seem to get it to activate. There is no mention of any other inclusions.
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string user_first_name;
string user_surname;
string title;
string address;
double x = 0;
double y = 0;
double z = 0;
cout << "Before we start, why not tell me your first name : ";
cin >> user_first_name;
cout << "Ok, for the sake of formalities, what is your surname? : ";
cin >> user_surname;
cout << "And is that Mr, Mrs or Ms? : ";
cin >> title;
string user_full_name = title + " " + user_first_name + " " + user_surname;
cout << "And what is your street address? : ";
getline ( cin, address );
cout << "Hi " << user_first_name << " nice to meet you.\n";
I note that the getline function color remains black while other functions are green. I presume this means that Codeblocks has not associated it with any of the listed header files. Has the tutorial omitted this detail?