HI,
  One more query . I know that we can over loas const member functions by 
removing const. consider that I overloaded a const member function. Now 
consider that I declared a  normal object (non-const). Now how can I access the 
const member functyion from non const object. As by default , this non const 
object will access  non-const member function.
example:
class Base
{
public:

    Base()
    {
        //printf("\n I am in Base cons");
    }
    void show(int i) const
    {
        printf("\n the val if i is %d and is cons method",i);
    }
    void show(int i)
    {
        printf("\n   I am in non const method");
    }
};
void main()
{
    Base obj;
    Base const obj1;
    obj.show(20);
    obj1.show(20);

// if I want to call show of non const using obj , if this not possible?
    
}


      Explore and discover exciting holidays and getaways with Yahoo! India 
Travel http://in.travel.yahoo.com/

[Non-text portions of this message have been removed]

Reply via email to