我有功能。如果用户没有ofstream
在这个函数中提供元素:
bool isPolpierwsza(int, bool = false, ofstream = NULL);
比我想分配“plik”
bool isPolpierwsza(int liczba, bool wypisz, ofstream plik)
去NULL
估价。
我的编译器输入错误:
2.9.cpp:5:48: 错误:没有从“long”到“ofstream”的可行转换(又名“basic_ofstream”)
bool isPolpierwsza(int, bool = false, ofstream = NULL);
如何将默认值设置为 ofstream 以被视为NULL
或“假”?