如何覆盖C++标准库类函数?在我的应用程序中,我ofstream在许多不同的代码位置使用对象.现在我想在Linux,Ubuntu中以不同的权限模式打开文件.但是没有参数的open功能ofstream指定它创建的文件的权限模式.
ofstream
open
现在我想覆盖类的open()功能,ofstream因此它将获得一个参数来指定用户访问的权限.
open()
c++ inheritance iostream
c++ ×1
inheritance ×1
iostream ×1