M
magnus.moraberg
Hi,
I have the following function -
void SaveFile(string fileName = default)
{
if(fileName.empty())
file.Save();
else
file.Save(fileName);
}
What should "default" be so that I can do the following -
SaveFile(); or
SaveFile("fileName");
Or must I have no default and do the following instead -
string dummy;
SaveFile(dummy);
Thanks for your help,
Barry
I have the following function -
void SaveFile(string fileName = default)
{
if(fileName.empty())
file.Save();
else
file.Save(fileName);
}
What should "default" be so that I can do the following -
SaveFile(); or
SaveFile("fileName");
Or must I have no default and do the following instead -
string dummy;
SaveFile(dummy);
Thanks for your help,
Barry