Hi Everyone,
Very beginner with C++. Reading some books and trying to write some codes as much as I can.
I'm trying to understand what voiding a function does. Now in the book and the searches I did says it doesn't return anything. But looking at the code below, doesn't it actually returns the "first" and "second" string when we call the function???
Sorry I'm really at the first step. Hope the question makes sense.
Thank you everyone in advance for answering.
#include <iostream>
using namespace std;
void PrintName(string first, string last)
{
string fullname = first + “ “ + last;
cout << fullname << endl;
}
int main()
{
PrintName(“Thomas”, “Jefferson”);
return 0;
}