
I’m finding out that Udacity’s Nanodegree is missing small details. I do believe someone wrote the curriculum over breakfast in bed and hurried up because their coffee was getting cold or something. ANYWAYS.
To use strings in C++, they must be included in your program as such:
#include <string>
using namespace std;
This is because strings:
- A class in C++
- Part of the standard library
#include <iostream>
#include <string>
using namespace std;
int main (){
string greeting = "Hello";
cout << greeting << "\n";
return 0;
}