Using void in functions without parameter?

前端 未结 5 1002
说谎
说谎 2021-02-19 07:44

In C++ using void in a function with no parameter, for example:

class WinMessage
{
public:
    BOOL Translate(void);
};

is redunda

5条回答
  •  别那么骄傲
    2021-02-19 08:37

    I think it will only help in backward compatibility with older C code, otherwise it is redundant.

提交回复
热议问题