I want to create an empty file in ubuntu with c++ and i tried many ways and it keeps failing and show this error
error: no matching function to 'std::basic_ofstream::open(std::cxxll::...
my code:
ifstream f(saltFile.c_str());
if (f.good())
{
cout << saltFile + " file already existed" << endl;
}
else
{
ofstream file;
file.open (saltFile, ios::out);
cout << saltFile << " created!" << endl;
}