{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

X ptry coutx coutx couty couty

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: inter Variable Declaring a Pointer Variable ► &ptr… Evaluates to the address of the location ptr ► *ptr… Evaluates to the value stored in the { address ptr int x,y; int *ptr; x = 52; y = 50; ptr = &x; ptr=&y; cout<<x; cout<<&x; cout<<y; cout<<&y; } Passing pointer to function Passing pointer to function Void getpointer(int *p1); Void main() { Int n=20; Int *p=&n; Cout<<“*p “<<*p; Cout<<“&n”<<&n; Getpointer(p); Cout<<“*p “<<*p; Cout<<“&n”<<&n; getch(); } Void getpointer( int *p1) { Cout<<“ *p1”<<*p1; } Pointers to classes Poi...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online