#include <iostream> #include <string> using namespace std; int main() { string food = "Pizza"; string &meal = food; // meal is a reference to food cout << food << "\n"; cout << meal << "\n"; return 0; } // Output: // Pizza // Pizza
Click Run to execute this code.