View Single Post
  #2 (permalink)  
Old 11-19-2007, 11:50 AM
Bacteria Bacteria is offline
Novice
Join Date: Nov 2007
Posts: 1
iTrader: (0)
Bacteria is on a distinguished road
well when you want to call a function using pointers you usde ->

Example :
We have a class Student
and this class has the function getstudentname();

in the main :
Code:
void main()
{
      Student s;
      Student *sptr;
 
sptr=&s;// sptr is pointing to all the functions of s
 
so we use :
sptr->getstudentname();
to use the function of s

__________________

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!

Last edited by TeraTask : 11-19-2007 at 11:57 AM. Reason: Added code tags
Reply With Quote
The Following 2 Users Say Thank You to Bacteria For This Useful Post:
HelloWorld (11-19-2007), TeraTask (11-21-2007)