myPreciousFunction(std::string s1 = "", std::string s2 = "")
{
}
int main()
{
myPreciousFunction();
}
Can i make the arguments look more pretty?
I want there to be empty strings if no arguments were supplied.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you may consider this:
But it doesn’t really look prettier.
Also, if you’re passing strings, you might want to pass them as
const&:This is a standard way to avoid coping the data around.