C++ Question: using

347 ワード

このコードを見てください.
#include <stdio.h>

struct A {
	void f() { printf("A::f
"); } }; struct B : A { using A::f; // #1 void f() { printf("B::f
"); } // #2 }; int main() { B().f(); #3 return 0; }

実行結果はどうなりますか?
A. B::f
B.#1コンパイルエラー
C.#2コンパイルエラー
D.#3コンパイルエラー