When you declare your function private, you can't use instance.function() to
access it. Is it generating a compile time error?
On 8 Jun 2011, at 00:31, Nilay Vaish wrote:
> Consider the following class declarations --
>
> class A
> {
> public:
> virtual void function() = 0;
> };
>
> class B : public A
> {
> private:
> void function();
> }
>
> int main()
> {
> B b;
> b.function();
> }
>
> Will this code compile correctly?
>
> --
> Nilay
> _______________________________________________
> gem5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev