Thread
:
What's arrow -> means in C++?
View Single Post
#
4
(
permalink
)
11-21-2007, 01:19 PM
akshay_pirate
Novice
Join Date: Nov 2007
Posts: 2
iTrader: (
0
)
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;
}
__________________
akshay_pirate
View Public Profile
Send a private message to akshay_pirate
Find all posts by akshay_pirate