problem with const

Discussion in 'Programmer's Corner' started by summeranson, Sep 24, 2009.

  1. summeranson

    Thread Starter Member

    Feb 12, 2009
    28
    0
    If Foo is a member function of a class, which of the following uses of const is legal?

    A. void Foo(Squid& a) const;

    B. void Foo(const Squid& a);

    C. void Foo(const Squid& a) const;

    D. None of the above

    E. const void Foo(const Squid& a) const;

    F. All of the above

    G. I don't know
     
  2. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    Shouldn't this be in the homework section?
     
Loading...