View Single Post
  #4 (permalink)  
Old 11-21-2007, 01:19 PM
akshay_pirate akshay_pirate is offline
Novice
Join Date: Nov 2007
Posts: 2
iTrader: (0)
akshay_pirate is on a distinguished road
well buddy,-> operator is used when you want to use data members or member functions of a class using that class's object's pointer.
ex:


class C{
public:
int x;
void get(int a){
x=a;
}
};
void main(){
C c;
C *c1;
c1=c;

c1->a(3);
cout<<c1->x;
}

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote