Question: The following code will not compile. Fix the code. Hint: copy and paste the code below into your answer box, then make the required changes.
The following code will not compile. Fix the code. Hint: copy and paste the code below into your answer box, then make the required changes. Use comments to explain why you added the code.
#include#include using namespace std; int main() { string name; getline(cin, name); printName(); return 0; } void printName(string name) { cout << "Hello " << name << endl; return; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
