本文介绍了这是有效的C ++吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 以下代码编译最新的VC ++,而不是EDG或MINGW。The following code compiles on the latest VC++, not EDG or MINGW. 展开 | 选择 | Wrap | 行号推荐答案 实际上代码实际上不应该做任何事情,我只是尽量使我的代码示例尽可能简洁。目的是授予对doSomething()方法的访问权限,否则该方法将从Derived对象中隐藏,如下所示:Actually the code is not really supposed to do anything, I just tried to make my code example as concise as possible. The intent is to grant access to the doSomething() method that would otherwise be hidden from a Derived object, like so: 展开 | 选择 | 换行 | 行号 你使用编译的那个。You use the one that compiles. 您可以这样编码。这不是推荐的,可以让你设置一个模糊的电话。但我已经看到了这个:You can code this way. It''s not recommended and can set you up for an ambiguous call. But I have seen this done: 展开 | 选择 | Wrap | 行号 这篇关于这是有效的C ++吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-22 12:22