Default arguments
I hade some problem to solve this, then I figure out right answer. Maybe it helps someone else :) Your usual order at your favorite cafe is black tea, which the waiter brings you by default. Today, however, you are with your friend and it is his first time there. Obtain your friend's order in one word as input, and place the order for both of you. Complete the function so that it will output "Black tea" by default (without an argument) and then your friend's order as an argument. Sample Input Americano Sample Output Black tea Americano Here is my code: #include <iostream> #include <string> using namespace std; //complete the function with one default argument string printOrder(string friendOrder, string myOrder="Black tea") { return myOrder + "\n" + friendOrder; } int main() { //getting coffee type string friendOrder; cin >> friendOrder; cout << printOrder(friendOrder); return 0; }